Reputation: 12729
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?
Upvotes: 1
Views: 837
Reputation: 37221
function GetXMLDOMDocument2(const XMLDocument: IXMLDocument): IXMLDOMDocument2;
begin
Result := (XMLDocument.DOMDocument as IXMLDOMNodeRef).GetXMLDOMNode as IXMLDOMDocument2;
end;
Upvotes: 7