firefox3 xpath

[email protected]
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <[email protected]>
Dear All,

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);

but when I shift to firefox3 it create WRONG_DOCUMENT_ERR, and after
some search, I found that I have to use document.importNode or
document.adoptNode to import a document from external source since it
has changed in firefox3. So I changed my code to,

var xmlDocNode;
var xml = loadXMLDoc(xmlStr); //transform to xml document from string
xmlDocNode = docuemnt.importNode(xml, true);
var nodes = document.evaluate(path, xmlDocNode, null,
XPathResult.ANY_TYPE,null);

but then it raise another error, Operation is not supported.
Any ideas??

Thanks
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.