I can't remember if jQuery supports namespaced elements, however have you tried to select them including their namespace?
It works for elements with unusual characters in there ids. From the FAQ: // Does not work $("#some.id") // Works! $("#some\\.id") http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F So you could try $("lib\\:catalog > lib\\:book",xml) Karl Rudd On 10/17/07, Orange <[EMAIL PROTECTED]> wrote: > > 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 > >