I think you're probably out of luck - the method was de-COMed, and is now not accessible from external C++ code.
In generally, using nsIDOM* interfaces from external applications is explicitly not supported. If you want to do DOM stuff, you should do so from JS, and communicate with your JS code using a JS-implemented XPCOM component. bholley On Sat, Nov 1, 2014 at 10:52 AM, <fuller...@gmail.com> wrote: > 在 2014年11月1日星期六UTC+8下午4时40分57秒,David Rajchenbach-Teller写道: > > I believe that the methods have migrated to > > > http://dxr.mozilla.org/mozilla-central/source/dom/xslt/xpath/XPathResult.h?from=XPathResult#47 > > > > Cheers, > > David > > > > On 01/11/14 08:43, fuller...@gmail.com wrote: > > > Hi, > > > > > > Xulrunner 33.x is different from the former releases. I cannot compile > my C++ XPCOMs because the new interface of nsIDOMXPathResult has not the > methods to get the values. > > > > > > What should I do? > > > _______________________________________________ > > > dev-platform mailing list > > > dev-platform@lists.mozilla.org > > > https://lists.mozilla.org/listinfo/dev-platform > > > > > > > > > -- > > David Rajchenbach-Teller, PhD > > Performance Team, Mozilla > > After I have included the header file XPathResult.h, one compilation error > appears as follows: > > xulrunner-sdk-33.0\include\nsStringFwd.h(15): fatal error C1189: #error > : Internal string headers are not available from external-linkage code > > My xpcom is coded as follows: > > nsCOMPtr<nsISupports> results; > rv = oEvaluator->Evaluate(path, checkDom, nsnull, > nsIDOMXPathResult::BOOLEAN_TYPE, nsnull, getter_AddRefs(results)); > if(NS_FAILED(rv)) { > ...; > } > nsRefPtr<mozilla::dom::XPathResult> oResult = do_QueryObject(results); > if(oResult == nsnull) { > ... > } > mozilla::ErrorResult errorResult; > bool boolVal = oResult->GetBooleanValue(errorResult); > if(errorResult.Failed()) { > ... > }else if(!boolVal) { > ... > } > > The VC compiler tells me that the parameter "path" in the method > Evaluate() can not be casted from nsAutoString to const nsAString. I guess > it was the cause of the compilation error. > > Am I wrong somewhere? > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform