Re: firefox3 xpath

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization Liberty Development
Message-ID <[email protected]>
[email protected] wrote:

> I was using firefox2 to load the following script with no problem,
> 
> var xmlDocNode;
> var xml = loadXMLDoc(xmlStr); //transform to xml document from string
> xmlDocNode = xml;
> var nodes = document.evaluate(path, xmlDocNode, null,
> XPathResult.ANY_TYPE,null);

If xmlDocNode is a DOM document then you should use

var nodes = xmlDocNode.evaluate(path, xmlDocNode, null,
XPathResult.ANY_TYPE,null);

If it is any other type of node then use

var nodes = xmlDocNode.ownerDocument.evaluate(path, xmlDocNode, null,
XPathResult.ANY_TYPE,null);

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.