Working with the XmlTextWriter


Working with the XmlTextWriter

The XmlTextWriter provides a forward-only, read-only, noncached way of generating XML streams. The XmlTextWriter helps you create well- formed XML documents that conform to the W3C XML 1.0 recommendation and the namespaces in XML recommendation. The XmlTextWriter holds very little in memory other than the text to write to the file. It does, however, keep a stack of objects that represent the tags that have been written to the XML stream. The objects on the stack are used to resolve namespace prefixes and to close elements and attributes automatically, as well as to help ensure well- formedness of the document.

What Is Not Supported?

Just like with the XmlTextReader , document type nodes are not supported by the .NET Compact Framework's XmlTextWriter . Attempting to write a document type declaration using the WriteDocumentType method will raise a NotSupportedException . Those who create their own XML writers can handle DTDs and can inherit from XmlWriter and overwrite the WriteDocumentType method.



Microsoft.NET Compact Framework Kick Start
Microsoft .NET Compact Framework Kick Start
ISBN: 0672325705
EAN: 2147483647
Year: 2003
Pages: 206

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net