Xpath query of XPathResult?
"hairbo" <[email protected]> 2 Jun 2006 08:55:15 -0700
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
Not sure if this is the best place for this question, so apologies if it is not. I would like to be able to run an Xpath query on the results returned by the XPathResult "evaluate" function. I have a shell of XML, like this: <results>arbitrary results here</results> ...where the "arbitrary results" could be a string, or more XML, such as: <results> <person> <firstname>John</firstname> <lastname>Doe</lastname> </person> </results> If I run an Xpath query to get the contents of the "results" node, I cannot then run another xpath query against those results. I suppose the question is this: is there any way to "reset" the returned value of "results" from an "XpathResult" back to an "XmlDocument", or something like it? The MSXML parser seems to have no difficulty running an xpath query on a returned nodeset, so I'm struggling to see why this appears to be so difficult in Mozilla's implementation. However, I'm fairly new to this code, so perhaps I'm missing some basic principle here. Any help would be appreciated.