Re: med2ris failure
Markus Hoenicka <[email protected]> Mon, 15 Oct 2007 12:24:23 +0200
| Newsgroups | gmane.text.refdb.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Bruce, Quoting Bruce Hayward <[email protected]>: > Recently I've been getting lots of failures when I try to convert a > Pubmed xml file to ris format. I can feel your pain, brother :-( This time it's not me but Pubmed who screwed up things. They have introduced a couple of changes lately which create invalid XML. > junk after document element at line 216, column 4, byte 11204 at > /usr/local/lib/perl5/site_perl/5.8.8/mach/XML/Parser.pm line 187 > > In this case the ris file contains only the first reference This is because the XML file contains consecutive top-level PubmedArticle elements. In a valid XML file these should be wrapped in a PubmedArticleSet element as they used to be until a few weeks ago. A workaround is to request the datasets individually. > not well-formed (invalid token) at line 3, column 27, byte 44 at > /usr/local/lib/perl5/site_perl/5.8.8/mach/XML/Parser.pm line 187 > > In this case the ris file is empty. This is because Pubmed no longer correctly exports attribute values. Compare the second element of a valid (until mid last week) and a recent entry: <MedlineCitation Owner="NLM" Status="MEDLINE"> vs. <MedlineCitation Owner Status> This again is invalid XML which the expat parser used by med2ris rightfully barfs at. One workaround is to copy the pretty-printed version (which happens to be valid) to your editor and save that to a file, instead of using the built-in "File" or "Text" tools in the drop-down box of the Pubmed interface. I have encountered additional XML problems in the last week or so. E.g. the author name "O'Brien" is no longer exported as is, but as "O'Brien" which again is invalid XML as the non-standard entity isn't declared anywhere. I've complained at the help desk about the latter two issues (I didn't know about the first one yet), and they told me they were working at a fix. But I think it won't hurt if you go ahead and contact them as well to tighten the thumb screws a bit further. regards, Markus -- Markus Hoenicka [email protected] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/