Evaluating an XPath expression in XML
问题 When using the Add-on SDK to create a Firefox add-on, how do you process an XML file? Evaluate with XPath throws an error: XPathResult is not defined I am trying to process this XML data with this code: var iterator = xmlDoc.evaluate('//stream', xmlDoc, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null); 回答1: Yes, a lot of global classes available in the window context aren't there in SDK modules which are sandboxes. You can access this constant via nsIDOMXPathResult interface: var {Ci} =