Hi all. I'm trying to use the "parent > child" selector on an XML document which contains namespaces : the XML :
<?xml version="1.0" encoding="ISO-8859-1"?> <lib:catalog xmlns:lib="http://localhost/"> <lib:book name="bookext"> <lib:user name="user"> <lib:book name="bookint"> </lib:book> </lib:user> </lib:book> </lib:catalog> and the jQuery Code (xml is the xml object): function parse() { $("catalog > book",xml).each(function(i) { console.log(i); console.log("node: "+this.tagName + " name: "+$(this).attr("name") + " type: " + $(this).attr("type")); }); } I use Firebug to log what's going on. The code is working if the xml contains no namespace, and return nothing as soon as I add the namespaces. Is it a knowned problem ? A bug ? Do I missed something ? Thanks for answers, Orange