Created
October 5, 2015 14:50
-
-
Save walkerdb/0620bfa65cb180febf8e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # turn the root etree into a string | |
| ead_text = etree.tostring(tree, xml_declaration=True, encoding="utf-8") | |
| # write the string to your new EAD file | |
| # the directory path and filename can be whatever you'd like | |
| with open(os.path.join("path/to/ead/directory", "new_ead.xml"), mode="w") as f: | |
| f.write(ead_text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment