[jQuery] filter().find() are not returning elements

[jQuery] filter().find() are not returning elements


Hello, I'm still a newbie at jQuery and I'm having some trouble trying
to select some nodes from XML. I'm simply trying to display the value
in the Value element. For some reason, it returns zero elements.
var xml = "<search><MyPlace><Value>123</Value></MyPlace></Search>";
$(xml).filter("MyPlace").find("Value").each(function() {
alert(this.value);
});
Also, I would have thought this would work, but it doesn't: $
(xml).filter("MyPlace").children() Do you know why?
Thank you in advance for any help!










    • Topic Participants

    • hello