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

dotnet xml : XMLWriter and XMLDocument


David Withnall
5/12/2004 1:56:08 AM
Okay

I am using an XMLDocument object to process several thousands of lodgements (from a database)

I am trying to output it from an XML Document to a file using the XmlDocument.WriteTo() method with an XmlWriter. It writes 131kB and then cuts out halfway through an element

Is this a limitation of XmlDocument.WriteTo() ? What would be a better way to output it

Daniel Cazzulino [MVP XML]
5/12/2004 8:17:04 AM
Ensure you're calling XmlWriter.Close() to cause the buffered writes to be
flushed to the underlying stream/textwriter.

--
Daniel Cazzulino [MVP XML]
Clarius Consulting SA
http://weblogs.asp.net/cazzu
http://aspnet2.com

[quoted text, click to view]
XmlDocument.WriteTo() method with an XmlWriter. It writes 131kB and then
cuts out halfway through an element.
[quoted text, click to view]


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 09/05/2004

Sonu Kapoor
5/12/2004 2:39:44 PM
From msdn:

XmlWriter.Flush Method:
This is called instead of Close when you want to write
more to the underlying stream without losing what is still
in the buffer.

Sonu
My Blog: http://weblogs.asp.net/sonukapoor/


[quoted text, click to view]
using the XmlDocument.WriteTo() method with an XmlWriter.
It writes 131kB and then cuts out halfway through an
element.
[quoted text, click to view]
AddThis Social Bookmark Button