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
564 stars 164 forks source link

"cannot use absolute path on element" when passing xml as string instead of fileobject #49

Closed rajasankar closed 6 years ago

rajasankar commented 6 years ago

Getting

> raise SyntaxError("cannot use absolute path on element")
> SyntaxError: cannot use absolute path on element
> 

Fixed when replacing all xpaths starting with // into .//

article_meta = tree.find('//article-meta') to article_meta = tree.find('.//article-meta')
daniel-acuna commented 6 years ago

Thanks. Can you give an example of a file that produces this error?