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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.119.81