Question

I am using Delphi 2010 with only the stock standard VCL libraries. The target system is win32.

If I have a reference to an IXMLDocument, how can I obtain an IXMLDOMDocument2 interface to the underlying object that IXMLDocument wraps?

Was it helpful?

Solution

function GetXMLDOMDocument2(const XMLDocument: IXMLDocument): IXMLDOMDocument2;
begin
  Result := (XMLDocument.DOMDocument as IXMLDOMNodeRef).GetXMLDOMNode as IXMLDOMDocument2;
end;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top