Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Very basic XML question, I am sure... >Thread Next - Re: Very basic XML question, I am sure... Re: Very basic XML question, I am sure...To: NULL Date: 8/2/2004 1:51:00 PM Sorry, you wanted delphi and I gave you VB, but the principal is the same.
> The code snippet in my last post will do the whole job for you
>
> 'you already have this part
> dim outmsxml as new domdocument
> outMSXML.loadXML('<?xml version = ''1.0''?>')
> newNode :=
> outMSXML.createNode(1,'NLIS_MESSAGE','http://www.www.www/NS/2001-01-10')
> outMSXML.appendChild(newNode)
> dim rootnode as ixmldomelement
> rootNode := outMSXML.DocumentElement
>
>
> 'this part will create a new node called NLIS_HEADER
> dim headernode as ixmldomelement
> set headernode
> =outMSXML.createnode(1,"NLIS_HEADER","http://www.www.www/NS/2001-01-10")
>
>
> 'this part will add that node as a child of the NLIS_MESSAGE node
> rootnode.appenchild(headernode)
>
> 'this part will create a new node called INTERFACE_VERSION_NUMBER
> dim ivnnode as ixmldomelement
> ivnnode
>
=outmsxml.createnode(1,"INTERFACE_VERSION_NUMBER","http://www.www.www/NS/200
> 1-01-10")
>
> 'this part will add that node as a child of the NLIS_HEADER node
> headernode.appendchild(ivnnode)
>
> 'this part sets the value of interface_version number to 6.0
> ivnnode.text = "6.0"
>
> that will give you your complete fragment
>
> <NLIS_MESSAGE xmlns="http://www.www.www/NS/2001-01-10">
> <NLIST_HEADER>
> <INTERFACE_VERSION_NUMBER>6.0</INTERFACE_VERSION_NUMBER>
> </NLIST_HEADER>
> </NLIS_MESSAGE>
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
