Wednesday, 4 February 2015




This question already has an answer here:




I have an XML document that looks someting like this:



<event>
<foo.bar>content</foo.bar>
</event>


I use jQuery to read this xml document as follows:



var $xml = $( $.parseXML(xmlStr) );


When i try to select the foo.bar node, it will search for a node with the name foo and the class bar. How can i select this node by tagname?



$xml.find( "foo.bar" ) //returns nothing, searches for tag foo with class bar

No comments:

Post a Comment