Last active
March 27, 2019 10:49
-
-
Save edsu/398ad8c9fbee51735166e829cda40989 to your computer and use it in GitHub Desktop.
Reading a string containing MARCXML with pymarc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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