Skip to content

Instantly share code, notes, and snippets.

@edsu edsu/test.py
Last active Mar 27, 2019

Embed
What would you like to do?
Reading a string containing MARCXML with pymarc.
from pymarc.marcxml import parse_xml_to_array
from io import StringIO
xml_text = open('test/batch.xml').read()
xml = StringIO(xml_text)
records = parse_xml_to_array(xml)
print(records)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.