by AlexZencovich » Tue Sep 23, 2008 12:49 pm
IXMLDOMDocument (IXMLDOMElement) is OLE interface to MSXML2 object. You should not pass empty refernce to that method, it will not create new one. You have to create XML document and pass pointer to root or another existed branch of that XML doument.
Just look how it works for PivotCube VCL demo (you may do similar)
procedure TForm1.LoadCubefromXMLClick(Sender: TObject);
var
Doc : IXMLDOMDocument;
begin
try
if PivotCube1.Active then
PivotCube1.Active := False;
Doc := CreateComObject(CLASS_DOMDOCUMENT30) as IXMLDomDocument;
Doc.async := False;
Doc.load('cubedemo.xml');
PivotCube1.LoadFromXML(Doc.documentElement);
finally
Doc := nil;
end;
end;
Best regards,
Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment