You should be able to find the tag using jQuery(data).find("ArticleTitle")
but the problem is that the XML returned by PubMed is escaped rather than
well-formed XML. I have no idea how to handle this. Can anyone else help?
- Abi

2009/1/16 Jon <[email protected]>

>
> I'm struggling with trying to learn to use jQuery to grab XML
> data...maybe someone will take pity on me and give me a hand with a
> simple example.
>
> I have the following code (with a static URL for illustration) which
> gets an article from the PubMed database in XML format. The
> displayMessage statement shows that the desired XML is being returned.
> Within the XML is a single occurrence of data with the tag
> ArticleTitle, and despite trying several ideas from this forum and
> elsewhere, I can't for the life of me figure out how to successfully
> get the contents of the ArticleTitle tag and assign it to a variable.
>
> execute: function( PMID ) {
>    var getUrl = "http://www.ncbi.nlm.nih.gov/pubmed/19072263?
> report=XML&format=text<http://www.ncbi.nlm.nih.gov/pubmed/19072263?report=XML&format=text>
> ";
>    jQuery.get(getUrl,null,function(data){
>      displayMessage(data);
>    });
>  }
>
> Many thanks to anyone willing to point a beginner in the right
> direction.
> --Jon
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to