System.Xml.XmlWriter: Method Members

The methods of System.Xml.XmlWriter are listed below. For a list of all members, see the XmlWriter Members list.

See Also: Inherited members from System.Object

Public Methods

Close()

When overridden in a derived class, closes this stream and the underlying stream.

static
Create(System.IO.Stream) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the specified stream.

static
Create(System.IO.TextWriter) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the specified System.IO.TextWriter.

static
Create(string) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the specified filename.

static
Create(System.Text.StringBuilder) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the specified System.Text.StringBuilder.

static
Create(XmlWriter) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the specified System.Xml.XmlWriter object.

static
Create(System.IO.Stream, XmlWriterSettings) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the stream and System.Xml.XmlWriterSettings object.

static
Create(System.IO.TextWriter, XmlWriterSettings) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the System.IO.TextWriter and System.Xml.XmlWriterSettings objects.

static
Create(string, XmlWriterSettings) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the filename and System.Xml.XmlWriterSettings object.

static
Create(System.Text.StringBuilder, XmlWriterSettings) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the System.Text.StringBuilder and System.Xml.XmlWriterSettings objects.

static
Create(XmlWriter, XmlWriterSettings) : XmlWriter

Creates a new System.Xml.XmlWriter instance using the specified System.Xml.XmlWriter and System.Xml.XmlWriterSettings objects.

Dispose()

Releases all resources used by the current instance of the System.Xml.XmlWriter class.

abstract
Flush()

When overridden in a derived class, flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

FlushAsync() : System.Threading.Tasks.Task

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

abstract
LookupPrefix(string) : string

When overridden in a derived class, returns the closest prefix defined in the current namespace scope for the namespace URI.

WriteAttributes(XmlReader, bool)

When overridden in a derived class, writes out all the attributes found at the current position in the System.Xml.XmlReader.

WriteAttributesAsync(XmlReader, bool) : System.Threading.Tasks.Task

Asynchronously writes out all the attributes found at the current position in the System.Xml.XmlReader.

WriteAttributeString(string, string)

When overridden in a derived class, writes out the attribute with the specified local name and value.

WriteAttributeString(string, string, string)

When overridden in a derived class, writes an attribute with the specified local name, namespace URI, and value.

WriteAttributeString(string, string, string, string)

When overridden in a derived class, writes out the attribute with the specified prefix, local name, namespace URI, and value.

WriteAttributeStringAsync(string, string, string, string) : System.Threading.Tasks.Task

Asynchronously writes out the attribute with the specified prefix, local name, namespace URI, and value.

abstract
WriteBase64(byte[], int, int)

When overridden in a derived class, encodes the specified binary bytes as Base64 and writes out the resulting text.

WriteBase64Async(byte[], int, int) : System.Threading.Tasks.Task

Asynchronously encodes the specified binary bytes as Base64 and writes out the resulting text.

WriteBinHex(byte[], int, int)

When overridden in a derived class, encodes the specified binary bytes as BinHex and writes out the resulting text.

WriteBinHexAsync(byte[], int, int) : System.Threading.Tasks.Task

Asynchronously encodes the specified binary bytes as BinHex and writes out the resulting text.

abstract
WriteCData(string)

When overridden in a derived class, writes out a <![CDATA[...]]> block containing the specified text.

WriteCDataAsync(string) : System.Threading.Tasks.Task

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

abstract
WriteCharEntity(char)

When overridden in a derived class, forces the generation of a character entity for the specified Unicode character value.

WriteCharEntityAsync(char) : System.Threading.Tasks.Task

Asynchronously forces the generation of a character entity for the specified Unicode character value.

abstract
WriteChars(char[], int, int)

When overridden in a derived class, writes text one buffer at a time.

WriteCharsAsync(char[], int, int) : System.Threading.Tasks.Task

Asynchronously writes text one buffer at a time.

abstract
WriteComment(string)

When overridden in a derived class, writes out a comment <!--...--> containing the specified text.

WriteCommentAsync(string) : System.Threading.Tasks.Task

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

abstract
WriteDocType(string, string, string, string)

When overridden in a derived class, writes the DOCTYPE declaration with the specified name and optional attributes.

WriteDocTypeAsync(string, string, string, string) : System.Threading.Tasks.Task

Asynchronously writes the DOCTYPE declaration with the specified name and optional attributes.

WriteElementString(string, string)

Writes an element with the specified local name and value.

WriteElementString(string, string, string)

Writes an element with the specified local name, namespace URI, and value.

WriteElementString(string, string, string, string)

Writes an element with the specified prefix, local name, namespace URI, and value.

WriteElementStringAsync(string, string, string, string) : System.Threading.Tasks.Task

Asynchronously writes an element with the specified prefix, local name, namespace URI, and value.

abstract
WriteEndAttribute()

When overridden in a derived class, closes the previous XmlWriter.WriteStartAttribute(string, string) call.

abstract
WriteEndDocument()

When overridden in a derived class, closes any open elements or attributes and puts the writer back in the Start state.

WriteEndDocumentAsync() : System.Threading.Tasks.Task

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

abstract
WriteEndElement()

When overridden in a derived class, closes one element and pops the corresponding namespace scope.

WriteEndElementAsync() : System.Threading.Tasks.Task

Asynchronously closes one element and pops the corresponding namespace scope.

abstract
WriteEntityRef(string)

When overridden in a derived class, writes out an entity reference as &name;.

WriteEntityRefAsync(string) : System.Threading.Tasks.Task

Asynchronously writes out an entity reference as &name;.

abstract
WriteFullEndElement()

When overridden in a derived class, closes one element and pops the corresponding namespace scope.

WriteFullEndElementAsync() : System.Threading.Tasks.Task

Asynchronously closes one element and pops the corresponding namespace scope.

WriteName(string)

When overridden in a derived class, 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).

WriteNameAsync(string) : System.Threading.Tasks.Task

Asynchronously 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).

WriteNmToken(string)

When overridden in a derived class, 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).

WriteNmTokenAsync(string) : System.Threading.Tasks.Task

Asynchronously 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).

WriteNode(XmlReader, bool)

When overridden in a derived class, copies everything from the reader to the writer and moves the reader to the start of the next sibling.

WriteNode(System.Xml.XPath.XPathNavigator, bool)

Copies everything from the System.Xml.XPath.XPathNavigator object to the writer. The position of the System.Xml.XPath.XPathNavigator remains unchanged.

WriteNodeAsync(XmlReader, bool) : System.Threading.Tasks.Task

Asynchronously copies everything from the reader to the writer and moves the reader to the start of the next sibling.

WriteNodeAsync(System.Xml.XPath.XPathNavigator, bool) : System.Threading.Tasks.Task

Asynchronously copies everything from the System.Xml.XPath.XPathNavigator object to the writer. The position of the System.Xml.XPath.XPathNavigator remains unchanged.

abstract
WriteProcessingInstruction(string, string)

When overridden in a derived class, writes out a processing instruction with a space between the name and text as follows: <?name text?>.

WriteProcessingInstructionAsync(string, string) : System.Threading.Tasks.Task

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

WriteQualifiedName(string, string)

When overridden in a derived class, writes out the namespace-qualified name. This method looks up the prefix that is in scope for the given namespace.

WriteQualifiedNameAsync(string, string) : System.Threading.Tasks.Task

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

abstract
WriteRaw(string)

When overridden in a derived class, writes raw markup manually from a string.

abstract
WriteRaw(char[], int, int)

When overridden in a derived class, writes raw markup manually from a character buffer.

WriteRawAsync(string) : System.Threading.Tasks.Task

Asynchronously writes raw markup manually from a string.

WriteRawAsync(char[], int, int) : System.Threading.Tasks.Task

Asynchronously writes raw markup manually from a character buffer.

WriteStartAttribute(string)

Writes the start of an attribute with the specified local name.

WriteStartAttribute(string, string)

Writes the start of an attribute with the specified local name and namespace URI.

abstract
WriteStartAttribute(string, string, string)

When overridden in a derived class, writes the start of an attribute with the specified prefix, local name, and namespace URI.

abstract
WriteStartDocument()

When overridden in a derived class, writes the XML declaration with the version "1.0".

abstract
WriteStartDocument(bool)

When overridden in a derived class, writes the XML declaration with the version "1.0" and the standalone attribute.

WriteStartDocumentAsync() : System.Threading.Tasks.Task

Asynchronously writes the XML declaration with the version "1.0".

WriteStartDocumentAsync(bool) : System.Threading.Tasks.Task

Asynchronously writes the XML declaration with the version "1.0" and the standalone attribute.

WriteStartElement(string)

When overridden in a derived class, writes out a start tag with the specified local name.

WriteStartElement(string, string)

When overridden in a derived class, writes the specified start tag and associates it with the given namespace.

abstract
WriteStartElement(string, string, string)

When overridden in a derived class, writes the specified start tag and associates it with the given namespace and prefix.

WriteStartElementAsync(string, string, string) : System.Threading.Tasks.Task

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

abstract
WriteString(string)

When overridden in a derived class, writes the given text content.

WriteStringAsync(string) : System.Threading.Tasks.Task

Asynchronously writes the given text content.

abstract
WriteSurrogateCharEntity(char, char)

When overridden in a derived class, generates and writes the surrogate character entity for the surrogate character pair.

WriteSurrogateCharEntityAsync(char, char) : System.Threading.Tasks.Task

Asynchronously generates and writes the surrogate character entity for the surrogate character pair.

WriteValue(bool)

Writes a bool value.

WriteValue(DateTime)

Writes a DateTime value.

WriteValue(DateTimeOffset)

Writes a DateTimeOffset value.

WriteValue(decimal)

Writes a decimal value.

WriteValue(double)

Writes a double value.

WriteValue(int)

Writes a int value.

WriteValue(long)

Writes a long value.

WriteValue(object)

Writes the object value.

WriteValue(float)

Writes a single-precision floating-point number.

WriteValue(string)

Writes a string value.

abstract
WriteWhitespace(string)

When overridden in a derived class, writes out the given white space.

WriteWhitespaceAsync(string) : System.Threading.Tasks.Task

Asynchronously writes out the given white space.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.Xml.XmlWriter and optionally releases the managed resources.

WriteEndAttributeAsync() : System.Threading.Tasks.Task

Asynchronously closes the previous XmlWriter.WriteStartAttribute(string, string) call.

WriteStartAttributeAsync(string, string, string) : System.Threading.Tasks.Task

Asynchronously writes the start of an attribute with the specified prefix, local name, and namespace URI.