Re: More XPath

"Leon Bezuidenhout" <[email protected]> Fri, 22 Dec 2006 08:17:43 +0200
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
Hi,

Sorry, I was not very clear on what I was doing. This data is not in an XML 
island, it is retrieved with an HTTPRequest. I am using MOZ 2.0

Thanks


"Jonas Sicking" <[email protected]> wrote in message 
news:[email protected]...
> Like Martin pointed out, your problem is most likely not in the XPath, but 
> in your handling of markups. Don't put XML inside HTML and expect it to 
> work. The HTML parser will apply all 10 years of web compatibility quirks 
> handling on the DOM and so lots of things might happen to it that you 
> don't expect.
>
> Have you looked at the DOM using the DOM-Inspector? Does it look like what 
> you think it does?
>
> If you want to pass XML along with your HTML then put it inside a comment 
> or inside a javascript variable and then parse it using DOMParser. Don't 
> put it right inside the markup since that's both more wasteful 
> processing-wise (first parsed as HTML and then serialized back to a 
> string), and exposes it to all the quirks of HTML parsing.
>
> / Jonas