Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing an issue with Pubmed entries without abstracts
Any Pubmed entries that is lacking an abstract text causes an error during the parsing of the XML file. As example use this article: http://www.ncbi.nlm.nih.gov/pubmed/22442467 You can download its XML file with $ curl "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=$22442467&retmode=xml" > 22442467.xml The is no "Abstract" and "AbstractText" element in there. The modification circumvent the error and an empty string is returned by the modified function.
- Loading branch information
0168464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS: I am not a PHP programmer so there might be more idiomatic solutions for this problem.