Connecting Tech Pros Worldwide Forums | Help | Site Map

XML creation XMLTextWriter vs MSXML

JD
Guest
 
Posts: n/a
#1: Nov 16 '05
Hi --

When I create an xml data stream using C# XMLTextWriter I can use
WriteStartElement/WriteElementString and WriteEndElement. Works great. Now
I'm trying to add elements to an existing piece of xml using C++ and MSXML.
And I'm have a difficult time creating elements and appending children to
accomplish the same as above 3 methods.

Tips appreciated.

Thanks,

Mike



Han
Guest
 
Posts: n/a
#2: Nov 16 '05

re: XML creation XMLTextWriter vs MSXML


Have you considered createElement and appendChild?

--
Pohwan Han. Seoul. Have a nice day.
"JD" <MrJackDanielsBlack@Hotmail.com> wrote in message
news:OK45UBn2EHA.1400@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hi --
>
> When I create an xml data stream using C# XMLTextWriter I can use
> WriteStartElement/WriteElementString and WriteEndElement. Works great. Now
> I'm trying to add elements to an existing piece of xml using C++ and
> MSXML.
> And I'm have a difficult time creating elements and appending children to
> accomplish the same as above 3 methods.
>
> Tips appreciated.
>
> Thanks,
>
> Mike
>
>[/color]

Wole Ogunremi
Guest
 
Posts: n/a
#3: Nov 16 '05

re: XML creation XMLTextWriter vs MSXML


XMLTextWriter should be used for creating new documents, not updating
existing ones.
Try using XMLDocument. You can then easily use CreateElement to create and
AppendChild to add the element to it's parent structure.

Good luck.
Wole

"JD" <MrJackDanielsBlack@Hotmail.com> wrote in message
news:OK45UBn2EHA.1400@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hi --
>
> When I create an xml data stream using C# XMLTextWriter I can use
> WriteStartElement/WriteElementString and WriteEndElement. Works great. Now
> I'm trying to add elements to an existing piece of xml using C++ and
> MSXML.
> And I'm have a difficult time creating elements and appending children to
> accomplish the same as above 3 methods.
>
> Tips appreciated.
>
> Thanks,
>
> Mike
>
>[/color]


Closed Thread