Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Very basic XML question, I am sure...

From: "Han" <hp4444@------.---.----->
To: NULL
Date: 8/2/2004 6:16:00 PM
Create a node first, then set the document element to the node. VBS syntax,

set node= xmldoc.createelement("node")
set xmldoc.documentelement=node

"Craig" <brokenleg@h...> wrote in message
news:410e01c8$0$7133$db0fefd9@n......
> I am new to XML, and am trying to create a brand new document. I don't
want
> to use myXML.load('....');
>
> I need to create the nodes with functions of MSXML.
>
> This is what I have. (Delphi code, but understandable)
>
>     outMSXML.loadXML('<?xml version = ''1.0''?>');
>     rootNode := outMSXML.DocumentElement;
>
>     newNode := outMSXML.createNode(1, 'NLIS_MESSAGE',
> 'http://www.www.www/NS/2001-01-10');
>     rootNode.appendChild( newNode );
>
> However, this is wrong. For a start, rootNode is nil, as there isn't a
node
> yet. How do I start it off? How do I create the first line? Below, os what
I
> am trying to obtain.
>
>
> <NLIS_MESSAGE xmlns="http://www.www.www/NS/2001-01-10"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xsi:schemaLocation="http://www.www.www/NS/2001-01-10 LA_Requests.xsd">
>     <NLIS_HEADER>
>         <INTERFACE_VERSION_NUMBER>6.00</INTERFACE_VERSION_NUMBER>
>
> .....
>
> Thanks,
>
> Craig
>
>




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent