titipata / pubmed_parser

:clipboard: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset
http://titipata.github.io/pubmed_parser/
MIT License
559 stars 164 forks source link

Fix error using parse_pubmed_xml() on current pubmed XML file #99

Closed raypereda closed 3 years ago

raypereda commented 3 years ago

The added pubmed21n1298.xml file works for parse_medline_xml() but not on parse_pubmed_xml(). This PR came out of this issue https://github.com/titipata/pubmed_parser/issues/95#issuecomment-860883115 It looks like the XML format changed. tree.find(".//article-meta") is returning NoneType and breaking following code.

titipata commented 3 years ago

This is awesome, thanks @raypereda! I tested and it works. I will accept the PR.