Re: Search elements with XPath

Eugene Prokopiev <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Another code:

var doc = document.implementation.createDocument("","",null);
doc.async = false;
doc.load("people.xml");
var methods = doc.evaluate(
    "/wsdl:definitions/wsdl:portType[@name='PeopleService']/wsdl:operation",
    doc,
    doc.createNSResolver(doc.documentElement),
    XPathResult.ORDERED_NODE_ITERATOR_TYPE,
    null
);
while (methods.iterateNext()) {
    alert(methods.singleNodeValue);
}

On line with alert:

Error: uncaught exception: [Exception... "The expression cannot be 
converted to return the specified type." code: "52" nsresult: 
"0x805b0034 (NS_ERROR_DOM_TYPE_ERR)" location: 
"file:///home/john/devel/xul/wsdl/wsdl.js Line: 13"]

What's wrong now?


-- 
Thanks,
Eugene Prokopiev
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.