Hi James

Its pretty straightforward really. Import the MSXML type library into your
project and do something like the following

function GetRootNode(AText : String) : IXMLDOMNode;
var
   Document : IXMLDOMDocument;
begin
   Document := CoDOMDocument.Create;
   Document.LoadXML(AText);
   Result := Document.ParentNode;
end;

You need to make sure you call CoInitialize() for each thread that creates
the XML COM server object.
I usually use Excel/Word VBA to view the properties/methods of the XML
objects, rather than looking through the type library.

Todd.

----- Original Message ----- 
From: "James F Sugrue" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 11:31 AM
Subject: [DUG]: IXMLDocument


> Has anyone had any experience using this to create an XML document from
scratch ?
>
> Any examples I could have a look at ?
>
>
> Cheers
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to