I am using the following code to fetch a record from pubmed:
(For your convenience I put in a specific pubmedid)
The following code tries to parse the xml:
This never finds the <Article> node (there is 1 Article element returned). You can look at the returned xml easily enough by cutting and pasting the url into your browser.
I must be missing something obvious.
Thanks,
pf
Code:
var url = "http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&rettype=xml&id=22028782"; XMLTools.loadXML(url, "editor.parsePubmedXML(xmlDoc, xmlText)");
The following code tries to parse the xml:
Code:
parsePubmedXML: function(xmlDoc, xmlText) {
if (xmlDoc == null) {
return;
}
var nodes = XMLTools.selectNodes(xmlDoc, "//Article");
isc.say("found " + nodes.length + " nodes");
}
I must be missing something obvious.
Thanks,
pf
Comment