jQuery relies on the browser to parse an (X)HTML string you give it, so it's going to be treated as a browsers treats it, as html. You'll have mixed success in this area, feeding xml. It's not an xml parser.
- Richard On Fri, Oct 17, 2008 at 9:34 AM, Robert Koberg <[EMAIL PROTECTED]> wrote: > > Hi, > > Do jQuery functions actually work over an XML DOM or just an HTML DOM? > > best, > -Rob > > > > On Oct 17, 2008, at 12:32 PM, Richard D. Worth wrote: > > See >> >> >> http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F >> >> - Richard >> >> On Fri, Oct 17, 2008 at 8:28 AM, Gissur Þórhallsson <[EMAIL PROTECTED]> >> wrote: >> I'm trying to parse this little XML document here: >> http://pastebin.com/m5f0e4300 with this code: >> function(response) { console.log(response.responseText) >> console.log(response.responseXML) try { console.log("Try and find nafn") >> console.log($j(response.responseXML).find("nafn").text()) >> console.log($j(response.responseXML).find("LM:nafn").text()) } catch(e) { >> console.log("WMS GetFeatureInfo XML Error") } } >> (JS code: http://pastebin.com/m5efc6214 ) >> And for some reason I get the following from the Firebug log: >> >> [The xml text] >> Document [A Document object of the XML] >> Try and find nafn >> [Empty line] >> [Empty line] >> >> Instead of those Empty lines I would like to get "Kópavogur". >> Anybody have any idea what I'm doing wrong? >> >> Kind regards from Iceland, >> gzur >> >> >> >> >