Issues - Importing files from EndNote to Zotero

edited April 27, 2020
Hi Everyone,

I am in the process of switching from EndNote to Zotero and have encountered a couple of issues while importing files from EndNote to Zotero. I will be much appreciated if anyone can provide any solutions to or suggestions for how to tackle the following issues.

Basically, I saved my EndNote file as an XML file and then imported the XML file into Zotero (I use Mac). However, two issues occurred.

1. The formatting in the Abstract field in EndNote was messed up a little bit in the Abstract field in Zotero after the XML file was imported into Zotero. Specifically, the formatting (e.g. bold and italics) was changed into codes, e.g. instead of displaying “Summary”, the text <b> Summary was displayed. I am wondering if there is any way for me to import an EndNote file into Zotero without the formatting in the Abstract field being messed up.

2. The Publisher field in EndNote seems not to be recognised in Zotero, probably because the corresponding field in Zotero is named as Institution. Hence, texts in the Publisher field in EndNote cannot be transferred to Zotero and the Institution field in Zotero is left blank for all imported entries, with texts in the Publisher field in EndNote being added as an additional note to records in Zotero. I know that I can manually enter texts into the Institution field in Zotero and delete the notes accordingly, but given that I have a large number of records (more than 700), I am wondering if there is any way to import texts in the Publisher field in EndNote correctly into the Institution field in Zotero.


Thanks,
Nan
  • 1. The formatting in the Abstract field in EndNote was messed up a little bit in the Abstract field in Zotero after the XML file was imported into Zotero.
    Zotero doesn't support rich text in the Abstract field, so if EndNote is exporting HTML, that will show up as raw HTML code in Zotero. We could give you a script to run that would strip all HTML in Abstract, but that's about it.

    Most metadata provided by publishers doesn't include rich-text abstracts, so this doesn't really come up. But if EndNote lets you use rich text in abstracts, we should probably update the EndNote XML translator to strip HTML tags for that field.
    2. The Publisher field in EndNote seems not to be recognised in Zotero, probably because the corresponding field in Zotero is named as Institution.
    Institution is mapped to Publisher, so this should work.

    Can you provide the XML for a single item that this doesn't work for?
  • edited May 1, 2020
    Hi dstillman,

    Thanks very much for your reply!

    Your explanation of the issue concerning the formatting in the Abstract field is very helpful. I will talk to my research collaborator to see what she would like to do with the formatting issue; I think I am likely to ask for the script to strip all HTML in Abstract.

    Regarding the issue of matching the Publisher field in EndNote with the Institution field in Zotero, please see below for the XML for a single item - apologies for the length of the item, but I could not find a much shorter XML.

    Thanks again,
    Nan



    -------------- XML for a single EndNote item -----------------

    <?xml version="1.0" encoding="UTF-8" ?><xml><records><record><database name="Arthur N Young papers_Box 78_Folder IMF 1944 to 6-15-44.enl" path="/Users/Arthur N Young papers_Box 78_Folder IMF 1944 to 6-15-44.enl">Arthur N Young papers_Box 78_Folder IMF 1944 to 6-15-44.enl</database><source-app name="EndNote" version="19.3">EndNote</source-app><rec-number>1</rec-number><foreign-keys><key app="EN" db-id="d0ea9a29bzead9efxf0x99vjzd02we2a5pze">1</key></foreign-keys><ref-type name="Report">27</ref-type><contributors><authors><author><style face="normal" font="default" size="100%">Economic Policy Commission of the American Bankers Association </style></author></authors><tertiary-authors><author><style face="normal" font="default" size="100%">Hoover Institution Library and Archives</style></author></tertiary-authors></contributors><titles><title><style face="normal" font="default" size="100%">(Suggested title: Extracts and Summaries of the Report on the Place of the United States in the Post-War Economy)</style></title></titles><pages><style face="normal" font="default" size="100%">6</style></pages><dates><year><style face="normal" font="default" size="100%">1943.09.01 &amp; 1943.12.11</style></year></dates><pub-location><style face="normal" font="default" size="100%">United States</style></pub-location><call-num><style face="normal" font="default" size="100%">Arthur N Young Papers, Box no. 78, Folder IMF 1944, to 6/15/44, Hoover Institution Archives</style></call-num><abstract><style face="bold" font="default" size="100%">Summary </style><style face="normal" font="default" size="100%">&#xD;&#xD;</style><style face="bold" font="default" size="100%">(photo numbered 2-7) </style><style face="normal" font="default" size="100%">extracts and summaries of the Report on the Place of the United States in the Post-War Economy released by the Economic Policy Commission of the American Bankers Association on 1 September 1943 and published in Chongqing on 11 December 1943; the report discussed in detail 1) two approaches to post-war global economic recovery (an idealistic approach and a more realistic approach) and 2) “seven essential points at which the strategy of recovery may well be directed” (including relief, prompt peace, collective security; monetary stability; lower trade barriers; reducing the swings of the trade cycle; making credit and capital available) – </style><style face="italic" font="default" size="100%">please see </style><style face="bold italic" font="default" size="100%">Notes 1</style><style face="italic" font="default" size="100%"> for some key points (Note: There were no underlines drawn or comments written in this report.)</style></abstract><notes><style face="bold" font="default" size="100%">Details about the extracts and summaries of the Report on the Place of the United States in the Post-War Economy</style><style face="normal" font="default" size="100%">&#xD;</style><style face="italic" font="default" size="100%">Note: “…” indicates direct quotations from the file.</style><style face="normal" font="default" size="100%">&#xD;&#xD;</style><style face="bold" font="default" size="100%">Notes 1 Key points in the extracts and summaries of the Report on the Place of the United States in the Post-War Economy</style><style face="normal" font="default" size="100%">&#xD;“… Apart from the enormously complicated problems of human relations, even the vast resources of the United States, the British Empire, the Soviet Union, and China, which would presumable share this duty with us, are inadequate for these purposes (e.g. placing other countries under democratic governments, raising living standards of all peoples, reducing the differentials in living standards between countries) …”</style></notes><urls><pdf-urls><url>internal-pdf://3829176425/Arthur N Young papers_Box 78_Folder IMF 1944 t.pdf</url></pdf-urls></urls></record></records></xml>
  • edited May 1, 2020
    There doesn't appear to be a publisher field in there at all.

    (You need to wrap XML with <code></code> tags to get it to appear here. I've fixed your post above.)
  • edited May 1, 2020
    I actually just realised that, but I did have information in the Publisher field in EndNote - is there any way that I can attach a screenshot to this forum?

    Thanks,
    Nan
  • You can upload a screenshot somewhere (e.g., Dropbox) and provide a link, but it wouldn't be relevant to us. We can only import what's in the XML. If you're not getting what you expect in the export, you'd need to talk to them.
  • I see ... I will look into the potential issue associated with exporting files from EndNote, and get in touch with EndNote if need be.

    Thanks very much for your timely response and help!

    Regards,
    Nan
  • edited May 1, 2020
    Is the publisher the value of tertiary-authors in the XML ("Hoover Institution Library and Archives"), or something else?

    We support tertiary-authors as a creator type for a few item types (e.g., "Editor" for "Book"). It's not mapped to the Publisher field, and EndNote XML has a separate publisher field that we import from. (But I believe EndNote XML is incredibly inconsistent between versions.)
  • Yes, "Hoover Institution Library and Archives" was in the Publisher field in EndNote and was marked as "tertiary-authors" in the additional note in Zotero.

    Again, your explanation really helps - many thanks!
  • Hi dstillman,

    Following your reply to my question regarding the formatting in the Abstract field in Zotero, could you please provide me with the script that I can run to strip all HTML in Abstract?

    Many thanks,
    Nan
  • edited May 6, 2020
    Sure. You can paste this into Tools → Developer Tools → Run JavaScript and run it to strip HTML tags from the Abstract field of all items in your personal library:

    var items = await Zotero.Items.getAll(Zotero.Libraries.userLibraryID);
    for (let item of items) {
    let abstract = item.getField('abstractNote');
    if (!abstract) continue;
    let newAbstract = Zotero.Utilities.unescapeHTML(abstract);
    if (abstract == newAbstract) continue;
    item.setField('abstractNote', newAbstract);
    await item.saveTx({
    skipDateModifiedUpdate: true
    });
    }


    You should close Zotero and make a backup of zotero.sqlite in your Zotero data directory before running this, and also temporarily disable auto-sync in the Sync pane of the preferences to give you a chance to review the changes before syncing.
  • Many thanks for this! I will try it out in the next couple of days.

    Regards,
    Nan
  • Hi dstillman,

    Just a quick question regarding the script you provided for stripping HTML tags from the Abstract field - do I need to change anything in the script?

    I tried to run the script but got the message "===>undefined<=== (undefined)" in the Return value column of the Run JavaScript dialogue window.

    Thanks,
    Nan
  • You don't need to change anything. If you ran it, your abstracts should've been updated.
  • I ran the script, but the HTML codes are still in the Abstract fields. Could it be because that I stored my Zotero data library in a customised location rather than the default location?

    Thanks,
    Nan
  • No, nothing to do with that, but this would only update your personal library. Are you testing this in your personal library or a group library?
  • I had previously tested it in a group library. I just tested in a personal library - it worked. Thanks very much.

    Regards,
    Nan

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.