I have Python code for parsing an XML file as detailed here. I understand that XML files are notorious for hogging system resources when manipulated in memory. My solution works
You can use elementtree.iterparse and discard each book tag after it is processed.