Groups | Blog | Home
all groups > dotnet xml > august 2004 >

dotnet xml : how do I import a XMLTextWriter into an XMLDOCUMENT?



Tarren
8/25/2004 9:51:36 AM
Hi:

I want to append a new transaction to a transaction log.

The transaction log is trans.xml

<transactions>
<transaction>
<id>12</id>
<stamp>1/1/1900 12:02</stamp>
</transaction>
</transactions>

Basically I have been able to make the new TRANSACTION fragments using an
XMLTextWriter.

My XMLDocument loads the xml file from disk.

How do I 'import' or 'insert' the contents of the XMLTextWriter into my
XMLDocument. All of the examples I have seen write straight to the file,
but replace whatever was already in the file.

Thanks!


Tarren
8/25/2004 11:25:40 AM
Found the answer and adapted to my scenario.

http://www.dotnet247.com/247reference/msgs/45/227747.aspx if anyone else is
interested.

Thanks all!

[quoted text, click to view]

AddThis Social Bookmark Button