User Tools


Export MARC Records from Drupal

NNELS will export its MARC records from Drupal for ingestion into third-party services like OCLC WorldCat and ABC (Accessible Books Consortium).

  1. Login to nnels.ca.
  2. In the NNELS Admin drop-down menu, select MARX XML File Builder - Searchable (Field Collection) or click this link.
  3. Use the search filters to locate the records that you want to export and click Apply.
  4. Check the records that you want to export.
  5. Click Generate MARC XML Export File. You will be given the option to select records on that page only or across multiple pages. (Note that large amount of records, such as more than a few thousands, will take a very long time to process and you may encounter error; in that case, consider exporting records in batches and combine them later.)
  6. Enter a title for your record set in the Title of new record-set field. This is for your reference only.
  7. Enter a description for your record set or leave it as the default "my description".
  8. Click Next
  9. You will be taken back to the main page. You should see a message at the top of the page similar to: File saved: please download via /export-sets/OCLC-batch-1
  10. Click on the above link and you'll be taken to the page where your record set lives.
  11. On this page, you should see something similar to: MARCXML Export Collection: File marcxml_export_198580.xml
  12. Click on the link to view the MARC XML file in your browser or right-click on the link and select Download Linked File As to save the MARC XML file to your computer.
  13. You can open the XML file using the software of your choice on your computer, i.e. a text editor, a browser, MarcEdit, etc.
  14. To locate your exported record set in the future, you can find it on the Marc Export Sets page.

Convert from MARC XML to MRC using MarcEdit

* Instructions may vary slightly depending on your version of MarcEdit.

  1. Open MarcEdit
  2. Select MARC Tools
  3. For Input File select the exported MARC XML file, i.e. marcxml_export_1.xml
  4. For Save File select where you want to save the output MRC file on your computer. Name it using the .mrc extension, i.e. marcxml_export_1.mrc
  5. From the Function List, select: MARCXML⇒MARC
  6. Leave the other fields as is.
  7. Click Execute.
  8. MarcEdit will process the XML file and you should find the .MRC file wherever you chose to save it on your computer (in step 4).

Convert multiple MARC XML files to MRC

  • Open MarcEdit.
  • Click on Tools in the menu bar.
  • Select Batch Process Records. A new window will open called MARC Utilities.
  • In the Source Directory field, select the folder where the MARC XML files live. Make sure these are the only XML files in the folder.
  • In the File Types field, input: xml
  • In the Functions drop-down menu, select: MARCXML⇒MARC
  • Click Process.
  • You will find the output MRC files in a folder called processed_files within the source directory you specified in step 2.

Combine Files using MarcEdit

You can use MarcEdit's MARCJoin feature to combine multiple MRC files into a single file:

  1. Open MarcEdit.
  2. Select MARCJoin.
  3. In the Save File field, select where you want to save the output file on your computer and give it a name, i.e. marcxml-export-combined.mrc
  4. In the File(s) to Join field, select all the MRC files that you want to combine into one file.
  5. Leave the Join Individual Files box checked.
  6. Click Process.
  7. MarcEdit will process your files and save the combined file in the location you specified in step 3.

Troubleshooting records with invalid XML

Some records may fail to export from Drupal with the error message "Invalid XML". To fix this:

  1. Go to the record’s “node” (or main page) in Drupal, e.g., https://nnels.ca/items/thuvia-maid-mars
  2. Click Edit.
  3. Go to the System NoEdit tab.
  4. Look at the MARCXML there (MARC XML String field) - make sure it is valid (you can use MarcEdit to validate); check that the <marc:record> opening and closing tags exist, and that all other tags have opening and closing tags.
  5. Make any changes as needed.
  6. Click Save.
  7. Re-export the record.
public/nnels/cataloguing/marc-exporter.txt · Last modified: 2020/03/31 13:55 by farrah.little