find xml element by attribute
- by Moudy
Using JQuery or Javascript how would I return 'Mary Boone' from the xml below starting out with the show 'id' attribute of '2'?
I'm thinking something along the lines of -
var result = xml.getElementByAttribute("2").gallery.text();
the XML:
<shows>
<show id="1">
<artist>Andreas Gursky</artist>
…