System.Xml.XmlTextWriter Members

The members of System.Xml.XmlTextWriter are listed below.

See Also: Inherited members from System.Xml.XmlWriter

Public Constructors

Creates an instance of the XmlTextWriter class using the specified System.IO.TextWriter.

Creates an instance of the XmlTextWriter class using the specified stream and encoding.

Creates an instance of the System.Xml.XmlTextWriter class using the specified file.

Public Properties

[read-only]
BaseStreamSystem.IO.Stream.

Gets the underlying stream object.

FormattingFormatting.

Indicates how the output is formatted.

Indentationint.

Gets or sets how many IndentChars to write for each level in the hierarchy when XmlTextWriter.Formatting is set to Formatting.Indented.

IndentCharchar.

Gets or sets which character to use for indenting when XmlTextWriter.Formatting is set to Formatting.Indented.

Namespacesbool.

Gets or sets a value indicating whether to do namespace support.

QuoteCharchar.

Gets or sets which character to use to quote attribute values.

[read-only]
override
WriteStateWriteState.

Gets the state of the writer.

[read-only]
override
XmlLangstring.

Gets the current xml:lang scope.

[read-only]
override
XmlSpaceXmlSpace.

Gets an System.Xml.XmlSpace representing the current xml:space scope.

Public Methods

override
Close()

Closes this stream and the underlying stream.

override
Flush()

Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

override
LookupPrefix(string) : string

Returns the closest prefix defined in the current namespace scope for the namespace URI.

override
WriteBase64(byte[], int, int)

Encodes the specified binary bytes as base64 and writes out the resulting text.

override
WriteBinHex(byte[], int, int)

Encodes the specified binary bytes as binhex and writes out the resulting text.

override
WriteCData(string)

Writes out a <![CDATA[...]]> block containing the specified text.

override
WriteCharEntity(char)

Forces the generation of a character entity for the specified Unicode character value.

override
WriteChars(char[], int, int)

Writes text one buffer at a time.

override
WriteComment(string)

Writes out a comment <!--...--> containing the specified text.

override
WriteDocType(string, string, string, string)

Writes the DOCTYPE declaration with the specified name and optional attributes.

override
WriteEndAttribute()

Closes the previous XmlTextWriter.WriteStartAttribute(string, string, string) call.

override
WriteEndDocument()

Closes any open elements or attributes and puts the writer back in the Start state.

override
WriteEndElement()

Closes one element and pops the corresponding namespace scope.

override
WriteEntityRef(string)

Writes out an entity reference as &name;.

override
WriteFullEndElement()

Closes one element and pops the corresponding namespace scope.

override
WriteName(string)

Writes out the specified name, ensuring it is a valid name according to the W3C XML 1.0 recommendation (http://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).

override
WriteNmToken(string)

Writes out the specified name, ensuring it is a valid NmToken according to the W3C XML 1.0 recommendation (http://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).

override
WriteProcessingInstruction(string, string)

Writes out a processing instruction with a space between the name and text as follows: <?name text?>.

override
WriteQualifiedName(string, string)

Writes out the namespace-qualified name. This method looks up the prefix that is in scope for the given namespace.

override
WriteRaw(string)

Writes raw markup manually from a string.

override
WriteRaw(char[], int, int)

Writes raw markup manually from a character buffer.

override
WriteStartAttribute(string, string, string)

Writes the start of an attribute.

override
WriteStartDocument()

Writes the XML declaration with the version "1.0".

override
WriteStartDocument(bool)

Writes the XML declaration with the version "1.0" and the standalone attribute.

override
WriteStartElement(string, string, string)

Writes the specified start tag and associates it with the given namespace and prefix.

override
WriteString(string)

Writes the given text content.

override
WriteSurrogateCharEntity(char, char)

Generates and writes the surrogate character entity for the surrogate character pair.

override
WriteWhitespace(string)

Writes out the given white space.