XmlDictionaryWriter XmlDictionaryWriter XmlDictionaryWriter XmlDictionaryWriter Class

定义

表示 Windows Communication Foundation (WCF) 从 XmlWriter 中派生的用于执行序列化和反序列化的一个抽象类。Represents an abstract class that Windows Communication Foundation (WCF) derives from XmlWriter to do serialization and deserialization.

public ref class XmlDictionaryWriter abstract : System::Xml::XmlWriter
public abstract class XmlDictionaryWriter : System.Xml.XmlWriter
type XmlDictionaryWriter = class
    inherit XmlWriter
Public MustInherit Class XmlDictionaryWriter
Inherits XmlWriter
继承
XmlDictionaryWriterXmlDictionaryWriterXmlDictionaryWriterXmlDictionaryWriter
派生

注解

从此类派生,可以执行除序列化之外的其他功能。You can derive from this class to do other functions than serialization.

请注意,对于 CDATA 部分中换行符的标准化,可能会遇到某个已知问题。Note that there is a known issue with the normalization of linefeed characters inside of CDATA sections that you may encounter.

构造函数

XmlDictionaryWriter() XmlDictionaryWriter() XmlDictionaryWriter() XmlDictionaryWriter()

初始化 XmlDictionaryWriter 类的新实例。Initializes a new instance of the XmlDictionaryWriter class.

属性

CanCanonicalize CanCanonicalize CanCanonicalize CanCanonicalize

此属性始终返回 falseThis property always returns false. 如果派生的类支持规范化,则可以重写这些类以返回 trueIts derived classes can override to return true if they support canonicalization.

Settings Settings Settings Settings

获取用于创建此 XmlWriter 实例的 XmlWriterSettings 对象。Gets the XmlWriterSettings object used to create this XmlWriter instance.

(Inherited from XmlWriter)
WriteState WriteState WriteState WriteState

当在派生类中被重写时,获取写入器的状态。When overridden in a derived class, gets the state of the writer.

(Inherited from XmlWriter)
XmlLang XmlLang XmlLang XmlLang

当在派生类中被重写时,获取当前的 xml:lang 范围。When overridden in a derived class, gets the current xml:lang scope.

(Inherited from XmlWriter)
XmlSpace XmlSpace XmlSpace XmlSpace

当在派生类中被重写时,获取表示当前 xml:space 范围的 XmlSpaceWhen overridden in a derived class, gets an XmlSpace representing the current xml:space scope.

(Inherited from XmlWriter)

方法

Close() Close() Close() Close()

当在派生类中被重写时,将关闭此流和基础流。When overridden in a derived class, closes this stream and the underlying stream.

(Inherited from XmlWriter)
CreateBinaryWriter(Stream) CreateBinaryWriter(Stream) CreateBinaryWriter(Stream) CreateBinaryWriter(Stream)

创建一个 XmlDictionaryWriter 实例,该实例写入 WCF 二进制 XML 格式。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateBinaryWriter(Stream, IXmlDictionary) CreateBinaryWriter(Stream, IXmlDictionary) CreateBinaryWriter(Stream, IXmlDictionary) CreateBinaryWriter(Stream, IXmlDictionary)

创建一个 XmlDictionaryWriter 实例,该实例写入 WCF 二进制 XML 格式。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession) CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession) CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession) CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession)

创建一个 XmlDictionaryWriter 实例,该实例写入 WCF 二进制 XML 格式。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession, Boolean) CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession, Boolean) CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession, Boolean) CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession, Boolean)

创建一个 XmlDictionaryWriter 实例,该实例写入 WCF 二进制 XML 格式。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateDictionaryWriter(XmlWriter) CreateDictionaryWriter(XmlWriter) CreateDictionaryWriter(XmlWriter) CreateDictionaryWriter(XmlWriter)

从现有的 XmlDictionaryWriter 创建 XmlWriter 的实例。Creates an instance of XmlDictionaryWriter from an existing XmlWriter.

CreateMtomWriter(Stream, Encoding, Int32, String) CreateMtomWriter(Stream, Encoding, Int32, String) CreateMtomWriter(Stream, Encoding, Int32, String) CreateMtomWriter(Stream, Encoding, Int32, String)

创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.

CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean) CreateMtomWriter(Stream, Encoding, Int32, String, String, String, Boolean, Boolean)

创建一个 XmlDictionaryWriter 实例,该实例以 MTOM 格式写入 XML。Creates an instance of XmlDictionaryWriter that writes XML in the MTOM format.

CreateTextWriter(Stream) CreateTextWriter(Stream) CreateTextWriter(Stream) CreateTextWriter(Stream)

创建一个 XmlDictionaryWriter 实例,该实例写入文本 XML。Creates an instance of XmlDictionaryWriter that writes text XML.

CreateTextWriter(Stream, Encoding) CreateTextWriter(Stream, Encoding) CreateTextWriter(Stream, Encoding) CreateTextWriter(Stream, Encoding)

创建一个 XmlDictionaryWriter 实例,该实例写入文本 XML。Creates an instance of XmlDictionaryWriter that writes text XML.

CreateTextWriter(Stream, Encoding, Boolean) CreateTextWriter(Stream, Encoding, Boolean) CreateTextWriter(Stream, Encoding, Boolean) CreateTextWriter(Stream, Encoding, Boolean)

创建一个 XmlDictionaryWriter 实例,该实例写入文本 XML。Creates an instance of XmlDictionaryWriter that writes text XML.

Dispose() Dispose() Dispose() Dispose()

释放 XmlWriter 类的当前实例所使用的所有资源。Releases all resources used by the current instance of the XmlWriter class.

(Inherited from XmlWriter)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

释放由 XmlWriter 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the XmlWriter and optionally releases the managed resources.

(Inherited from XmlWriter)
EndCanonicalization() EndCanonicalization() EndCanonicalization() EndCanonicalization()

在由派生类实现时,它会停止由匹配的 StartCanonicalization(Stream, Boolean, String[]) 调用启动的规范化。When implemented by a derived class, it stops the canonicalization started by the matching StartCanonicalization(Stream, Boolean, String[]) call.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Flush() Flush() Flush() Flush()

当在派生类中被重写时,将缓冲区中的所有内容刷新到基础流,并同时刷新基础流。When overridden in a derived class, flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

(Inherited from XmlWriter)
FlushAsync() FlushAsync() FlushAsync() FlushAsync()

将缓冲区中的所有内容异步刷新到基础流,并同时刷新基础流。Asynchronously flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

(Inherited from XmlWriter)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
LookupPrefix(String) LookupPrefix(String) LookupPrefix(String) LookupPrefix(String)

当在派生类中被重写时,返回在当前命名空间范围中为该命名空间 URI 定义的最近的前缀。When overridden in a derived class, returns the closest prefix defined in the current namespace scope for the namespace URI.

(Inherited from XmlWriter)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
StartCanonicalization(Stream, Boolean, String[]) StartCanonicalization(Stream, Boolean, String[]) StartCanonicalization(Stream, Boolean, String[]) StartCanonicalization(Stream, Boolean, String[])

当通过派生类实现时,就开始规范化。When implemented by a derived class, it starts the canonicalization.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
WriteArray(String, String, String, Boolean[], Int32, Int32) WriteArray(String, String, String, Boolean[], Int32, Int32) WriteArray(String, String, String, Boolean[], Int32, Int32) WriteArray(String, String, String, Boolean[], Int32, Int32)

Boolean 数组写入节点。Writes nodes from a Boolean array.

WriteArray(String, String, String, DateTime[], Int32, Int32) WriteArray(String, String, String, DateTime[], Int32, Int32) WriteArray(String, String, String, DateTime[], Int32, Int32) WriteArray(String, String, String, DateTime[], Int32, Int32)

DateTime 数组写入节点。Writes nodes from a DateTime array.

WriteArray(String, String, String, Decimal[], Int32, Int32) WriteArray(String, String, String, Decimal[], Int32, Int32) WriteArray(String, String, String, Decimal[], Int32, Int32) WriteArray(String, String, String, Decimal[], Int32, Int32)

Decimal 数组写入节点。Writes nodes from a Decimal array.

WriteArray(String, String, String, Double[], Int32, Int32) WriteArray(String, String, String, Double[], Int32, Int32) WriteArray(String, String, String, Double[], Int32, Int32) WriteArray(String, String, String, Double[], Int32, Int32)

Double 数组写入节点。Writes nodes from a Double array.

WriteArray(String, String, String, Guid[], Int32, Int32) WriteArray(String, String, String, Guid[], Int32, Int32) WriteArray(String, String, String, Guid[], Int32, Int32) WriteArray(String, String, String, Guid[], Int32, Int32)

Guid 数组写入节点。Writes nodes from a Guid array.

WriteArray(String, String, String, Int16[], Int32, Int32) WriteArray(String, String, String, Int16[], Int32, Int32) WriteArray(String, String, String, Int16[], Int32, Int32) WriteArray(String, String, String, Int16[], Int32, Int32)

Int16 数组写入节点。Writes nodes from a Int16 array.

WriteArray(String, String, String, Int32[], Int32, Int32) WriteArray(String, String, String, Int32[], Int32, Int32) WriteArray(String, String, String, Int32[], Int32, Int32) WriteArray(String, String, String, Int32[], Int32, Int32)

Int32 数组写入节点。Writes nodes from a Int32 array.

WriteArray(String, String, String, Int64[], Int32, Int32) WriteArray(String, String, String, Int64[], Int32, Int32) WriteArray(String, String, String, Int64[], Int32, Int32) WriteArray(String, String, String, Int64[], Int32, Int32)

Int64 数组写入节点。Writes nodes from a Int64 array.

WriteArray(String, String, String, Single[], Int32, Int32) WriteArray(String, String, String, Single[], Int32, Int32) WriteArray(String, String, String, Single[], Int32, Int32) WriteArray(String, String, String, Single[], Int32, Int32)

Single 数组写入节点。Writes nodes from a Single array.

WriteArray(String, String, String, TimeSpan[], Int32, Int32) WriteArray(String, String, String, TimeSpan[], Int32, Int32) WriteArray(String, String, String, TimeSpan[], Int32, Int32) WriteArray(String, String, String, TimeSpan[], Int32, Int32)

TimeSpan 数组写入节点。Writes nodes from a TimeSpan array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Boolean[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Boolean[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Boolean[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Boolean[], Int32, Int32)

Boolean 数组写入节点。Writes nodes from a Boolean array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, DateTime[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, DateTime[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, DateTime[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, DateTime[], Int32, Int32)

DateTime 数组写入节点。Writes nodes from a DateTime array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Decimal[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Decimal[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Decimal[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Decimal[], Int32, Int32)

Decimal 数组写入节点。Writes nodes from a Decimal array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Double[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Double[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Double[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Double[], Int32, Int32)

Double 数组写入节点。Writes nodes from a Double array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Guid[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Guid[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Guid[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Guid[], Int32, Int32)

Guid 数组写入节点。Writes nodes from a Guid array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int16[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int16[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int16[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int16[], Int32, Int32)

Int16 数组写入节点。Writes nodes from a Int16 array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int32[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int32[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int32[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int32[], Int32, Int32)

Int32 数组写入节点。Writes nodes from a Int32 array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int64[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int64[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int64[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Int64[], Int32, Int32)

Int64 数组写入节点。Writes nodes from a Int64 array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, Single[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Single[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Single[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, Single[], Int32, Int32)

Single 数组写入节点。Writes nodes from a Single array.

WriteArray(String, XmlDictionaryString, XmlDictionaryString, TimeSpan[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, TimeSpan[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, TimeSpan[], Int32, Int32) WriteArray(String, XmlDictionaryString, XmlDictionaryString, TimeSpan[], Int32, Int32)

TimeSpan 数组写入节点。Writes nodes from a TimeSpan array.

WriteAttributes(XmlReader, Boolean) WriteAttributes(XmlReader, Boolean) WriteAttributes(XmlReader, Boolean) WriteAttributes(XmlReader, Boolean)

当在派生类中被重写时,写出在 XmlReader 中当前位置找到的所有属性。When overridden in a derived class, writes out all the attributes found at the current position in the XmlReader.

(Inherited from XmlWriter)
WriteAttributesAsync(XmlReader, Boolean) WriteAttributesAsync(XmlReader, Boolean) WriteAttributesAsync(XmlReader, Boolean) WriteAttributesAsync(XmlReader, Boolean)

XmlReader 中的当前位置异步写出找到的所有属性。Asynchronously writes out all the attributes found at the current position in the XmlReader.

(Inherited from XmlWriter)
WriteAttributeString(String, String) WriteAttributeString(String, String) WriteAttributeString(String, String) WriteAttributeString(String, String)

当在派生类中被重写时,写出具有指定的本地名称和值的属性。When overridden in a derived class, writes out the attribute with the specified local name and value.

(Inherited from XmlWriter)
WriteAttributeString(String, String, String) WriteAttributeString(String, String, String) WriteAttributeString(String, String, String) WriteAttributeString(String, String, String)

当在派生类中被重写时,写入具有指定的本地名称、命名空间 URI 和值的属性。When overridden in a derived class, writes an attribute with the specified local name, namespace URI, and value.

(Inherited from XmlWriter)
WriteAttributeString(String, String, String, String) WriteAttributeString(String, String, String, String) WriteAttributeString(String, String, String, String) WriteAttributeString(String, String, String, String)

当在派生类中被重写时,写出具有指定的前缀、本地名称、命名空间 URI 和值的属性。When overridden in a derived class, writes out the attribute with the specified prefix, local name, namespace URI, and value.

(Inherited from XmlWriter)
WriteAttributeString(String, XmlDictionaryString, XmlDictionaryString, String) WriteAttributeString(String, XmlDictionaryString, XmlDictionaryString, String) WriteAttributeString(String, XmlDictionaryString, XmlDictionaryString, String) WriteAttributeString(String, XmlDictionaryString, XmlDictionaryString, String)

写入属性的限定名和值。Writes an attribute qualified name and value.

WriteAttributeString(XmlDictionaryString, XmlDictionaryString, String) WriteAttributeString(XmlDictionaryString, XmlDictionaryString, String) WriteAttributeString(XmlDictionaryString, XmlDictionaryString, String) WriteAttributeString(XmlDictionaryString, XmlDictionaryString, String)

写入属性的限定名和值。Writes an attribute qualified name and value.

WriteAttributeStringAsync(String, String, String, String) WriteAttributeStringAsync(String, String, String, String) WriteAttributeStringAsync(String, String, String, String) WriteAttributeStringAsync(String, String, String, String)

异步写出具有指定前缀、本地名称、命名空间 URI 和值的属性。Asynchronously writes out the attribute with the specified prefix, local name, namespace URI, and value.

(Inherited from XmlWriter)
WriteBase64(Byte[], Int32, Int32) WriteBase64(Byte[], Int32, Int32) WriteBase64(Byte[], Int32, Int32) WriteBase64(Byte[], Int32, Int32)

当在派生类中被重写时,将指定的二进制字节编码为 Base64 并写出结果文本。When overridden in a derived class, encodes the specified binary bytes as Base64 and writes out the resulting text.

(Inherited from XmlWriter)
WriteBase64Async(Byte[], Int32, Int32) WriteBase64Async(Byte[], Int32, Int32) WriteBase64Async(Byte[], Int32, Int32) WriteBase64Async(Byte[], Int32, Int32)

将指定的二进制字节异步编码为 Base64 并写出结果文本。Asynchronously encodes the specified binary bytes as Base64 and writes out the resulting text.

WriteBinHex(Byte[], Int32, Int32) WriteBinHex(Byte[], Int32, Int32) WriteBinHex(Byte[], Int32, Int32) WriteBinHex(Byte[], Int32, Int32)

当在派生类中被重写时,将指定的二进制字节编码为 BinHex 并写出结果文本。When overridden in a derived class, encodes the specified binary bytes as BinHex and writes out the resulting text.

(Inherited from XmlWriter)
WriteBinHexAsync(Byte[], Int32, Int32) WriteBinHexAsync(Byte[], Int32, Int32) WriteBinHexAsync(Byte[], Int32, Int32) WriteBinHexAsync(Byte[], Int32, Int32)

将指定的二进制字节异步编码为 BinHex 并写出结果文本。Asynchronously encodes the specified binary bytes as BinHex and writes out the resulting text.

(Inherited from XmlWriter)
WriteCData(String) WriteCData(String) WriteCData(String) WriteCData(String)

当在派生类中被重写时,写出包含指定文本的 <![CDATA[...]]> 块。When overridden in a derived class, writes out a <![CDATA[...]]> block containing the specified text.

(Inherited from XmlWriter)
WriteCDataAsync(String) WriteCDataAsync(String) WriteCDataAsync(String) WriteCDataAsync(String)

异步写出一个包含指定文本的 <![CDATA[...]]> 块。Asynchronously writes out a <![CDATA[...]]> block containing the specified text.

(Inherited from XmlWriter)
WriteCharEntity(Char) WriteCharEntity(Char) WriteCharEntity(Char) WriteCharEntity(Char)

当在派生类中被重写时,为指定的 Unicode 字符值强制生成字符实体。When overridden in a derived class, forces the generation of a character entity for the specified Unicode character value.

(Inherited from XmlWriter)
WriteCharEntityAsync(Char) WriteCharEntityAsync(Char) WriteCharEntityAsync(Char) WriteCharEntityAsync(Char)

为指定的 Unicode 字符值异步强制生成字符实体。Asynchronously forces the generation of a character entity for the specified Unicode character value.

(Inherited from XmlWriter)
WriteChars(Char[], Int32, Int32) WriteChars(Char[], Int32, Int32) WriteChars(Char[], Int32, Int32) WriteChars(Char[], Int32, Int32)

当在派生类中被重写时,以每次一个缓冲区的方式写入文本。When overridden in a derived class, writes text one buffer at a time.

(Inherited from XmlWriter)
WriteCharsAsync(Char[], Int32, Int32) WriteCharsAsync(Char[], Int32, Int32) WriteCharsAsync(Char[], Int32, Int32) WriteCharsAsync(Char[], Int32, Int32)

以每次一个缓冲区的方式异步写入文本。Asynchronously writes text one buffer at a time.

(Inherited from XmlWriter)
WriteComment(String) WriteComment(String) WriteComment(String) WriteComment(String)

当在派生类中被重写时,写出包含指定文本的注释 <!--...-->。When overridden in a derived class, writes out a comment <!--...--> containing the specified text.

(Inherited from XmlWriter)
WriteCommentAsync(String) WriteCommentAsync(String) WriteCommentAsync(String) WriteCommentAsync(String)

异步写出一个包含指定文本的注释 <!--...-->。Asynchronously writes out a comment <!--...--> containing the specified text.

(Inherited from XmlWriter)
WriteDocType(String, String, String, String) WriteDocType(String, String, String, String) WriteDocType(String, String, String, String) WriteDocType(String, String, String, String)

当在派生类中被重写时,写出具有指定名称和可选属性的 DOCTYPE 声明。When overridden in a derived class, writes the DOCTYPE declaration with the specified name and optional attributes.

(Inherited from XmlWriter)
WriteDocTypeAsync(String, String, String, String) WriteDocTypeAsync(String, String, String, String) WriteDocTypeAsync(String, String, String, String) WriteDocTypeAsync(String, String, String, String)

异步写入具有指定名称和可选属性的 DOCTYPE 声明。Asynchronously writes the DOCTYPE declaration with the specified name and optional attributes.

(Inherited from XmlWriter)
WriteElementString(String, String) WriteElementString(String, String) WriteElementString(String, String) WriteElementString(String, String)

写入具有指定的本地名称和值的元素。Writes an element with the specified local name and value.

(Inherited from XmlWriter)
WriteElementString(String, String, String) WriteElementString(String, String, String) WriteElementString(String, String, String) WriteElementString(String, String, String)

写入具有指定的本地名称、命名空间 URI 和值的元素。Writes an element with the specified local name, namespace URI, and value.

(Inherited from XmlWriter)
WriteElementString(String, String, String, String) WriteElementString(String, String, String, String) WriteElementString(String, String, String, String) WriteElementString(String, String, String, String)

写入具有指定的前缀、本地名称、命名空间 URI 和值的元素。Writes an element with the specified prefix, local name, namespace URI, and value.

(Inherited from XmlWriter)
WriteElementString(String, XmlDictionaryString, XmlDictionaryString, String) WriteElementString(String, XmlDictionaryString, XmlDictionaryString, String) WriteElementString(String, XmlDictionaryString, XmlDictionaryString, String) WriteElementString(String, XmlDictionaryString, XmlDictionaryString, String)

写入包含文本内容的元素。Writes an element with a text content.

WriteElementString(XmlDictionaryString, XmlDictionaryString, String) WriteElementString(XmlDictionaryString, XmlDictionaryString, String) WriteElementString(XmlDictionaryString, XmlDictionaryString, String) WriteElementString(XmlDictionaryString, XmlDictionaryString, String)

写入包含文本内容的元素。Writes an element with a text content.

WriteElementStringAsync(String, String, String, String) WriteElementStringAsync(String, String, String, String) WriteElementStringAsync(String, String, String, String) WriteElementStringAsync(String, String, String, String)

异步写入具有指定的前缀、本地名称、命名空间 URI 和值的元素。Asynchronously writes an element with the specified prefix, local name, namespace URI, and value.

(Inherited from XmlWriter)
WriteEndAttribute() WriteEndAttribute() WriteEndAttribute() WriteEndAttribute()

当在派生类中被重写时,关闭上一个 WriteStartAttribute(String, String) 调用。When overridden in a derived class, closes the previous WriteStartAttribute(String, String) call.

(Inherited from XmlWriter)
WriteEndAttributeAsync() WriteEndAttributeAsync() WriteEndAttributeAsync() WriteEndAttributeAsync()

异步关闭前一个 WriteStartAttribute(String, String) 调用。Asynchronously closes the previous WriteStartAttribute(String, String) call.

(Inherited from XmlWriter)
WriteEndDocument() WriteEndDocument() WriteEndDocument() WriteEndDocument()

当在派生类中被重写时,关闭任何打开的元素或属性并将写入器重新设置为起始状态。When overridden in a derived class, closes any open elements or attributes and puts the writer back in the Start state.

(Inherited from XmlWriter)
WriteEndDocumentAsync() WriteEndDocumentAsync() WriteEndDocumentAsync() WriteEndDocumentAsync()

异步关闭任何打开的元素或属性并将写入器重新设置为起始状态。Asynchronously closes any open elements or attributes and puts the writer back in the Start state.

(Inherited from XmlWriter)
WriteEndElement() WriteEndElement() WriteEndElement() WriteEndElement()

当在派生类中被重写时,关闭一个元素并弹出相应的命名空间范围。When overridden in a derived class, closes one element and pops the corresponding namespace scope.

(Inherited from XmlWriter)
WriteEndElementAsync() WriteEndElementAsync() WriteEndElementAsync() WriteEndElementAsync()

异步关闭一个元素并弹出相应的命名空间范围。Asynchronously closes one element and pops the corresponding namespace scope.

(Inherited from XmlWriter)
WriteEntityRef(String) WriteEntityRef(String) WriteEntityRef(String) WriteEntityRef(String)

当在派生类中被重写时,按 &name; 写出实体引用。When overridden in a derived class, writes out an entity reference as &name;.

(Inherited from XmlWriter)
WriteEntityRefAsync(String) WriteEntityRefAsync(String) WriteEntityRefAsync(String) WriteEntityRefAsync(String)

&name; 异步写出实体引用。Asynchronously writes out an entity reference as &name;.

(Inherited from XmlWriter)
WriteFullEndElement() WriteFullEndElement() WriteFullEndElement() WriteFullEndElement()

当在派生类中被重写时,关闭一个元素并弹出相应的命名空间范围。When overridden in a derived class, closes one element and pops the corresponding namespace scope.

(Inherited from XmlWriter)
WriteFullEndElementAsync() WriteFullEndElementAsync() WriteFullEndElementAsync() WriteFullEndElementAsync()

异步关闭一个元素并弹出相应的命名空间范围。Asynchronously closes one element and pops the corresponding namespace scope.

(Inherited from XmlWriter)
WriteName(String) WriteName(String) WriteName(String) WriteName(String)

当在派生类中被重写时,写出指定的名称,确保它是符合 W3C XML 1.0 建议 (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name)) 的有效名称。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 (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).

(Inherited from XmlWriter)
WriteNameAsync(String) WriteNameAsync(String) WriteNameAsync(String) WriteNameAsync(String)

异步写出指定的名称,确保它是符合 W3C XML 1.0 建议 (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name)) 的有效名称。Asynchronously writes out the specified name, ensuring it is a valid name according to the W3C XML 1.0 recommendation (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).

(Inherited from XmlWriter)
WriteNmToken(String) WriteNmToken(String) WriteNmToken(String) WriteNmToken(String)

当在派生类中被重写时,写出指定的名称,确保它是符合 W3C XML 1.0 建议 (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name)) 的有效 NmToken。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 (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).

(Inherited from XmlWriter)
WriteNmTokenAsync(String) WriteNmTokenAsync(String) WriteNmTokenAsync(String) WriteNmTokenAsync(String)

异步写出指定的名称,确保它是符合 W3C XML 1.0 建议 (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name)) 的有效 NmToken。Asynchronously writes out the specified name, ensuring it is a valid NmToken according to the W3C XML 1.0 recommendation (https://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).

(Inherited from XmlWriter)
WriteNode(XmlDictionaryReader, Boolean) WriteNode(XmlDictionaryReader, Boolean) WriteNode(XmlDictionaryReader, Boolean) WriteNode(XmlDictionaryReader, Boolean)

XmlDictionaryReader 写入当前 XML 节点。Writes the current XML node from an XmlDictionaryReader.

WriteNode(XmlReader, Boolean) WriteNode(XmlReader, Boolean) WriteNode(XmlReader, Boolean) WriteNode(XmlReader, Boolean)

XmlReader 写入当前 XML 节点。Writes the current XML node from an XmlReader.

WriteNode(XPathNavigator, Boolean) WriteNode(XPathNavigator, Boolean) WriteNode(XPathNavigator, Boolean) WriteNode(XPathNavigator, Boolean)

将所有内容从 XPathNavigator 对象复制到编写器。Copies everything from the XPathNavigator object to the writer. XPathNavigator 的位置保持不变。The position of the XPathNavigator remains unchanged.

(Inherited from XmlWriter)
WriteNodeAsync(XmlReader, Boolean) WriteNodeAsync(XmlReader, Boolean) WriteNodeAsync(XmlReader, Boolean) WriteNodeAsync(XmlReader, Boolean)

将所有内容从读取器异步复制到写入器并将读取器移动到下一个同级的开头。Asynchronously copies everything from the reader to the writer and moves the reader to the start of the next sibling.

(Inherited from XmlWriter)
WriteNodeAsync(XPathNavigator, Boolean) WriteNodeAsync(XPathNavigator, Boolean) WriteNodeAsync(XPathNavigator, Boolean) WriteNodeAsync(XPathNavigator, Boolean)

从编写器的 XPathNavigator 对象中异步复制所有内容。Asynchronously copies everything from the XPathNavigator object to the writer. XPathNavigator 的位置保持不变。The position of the XPathNavigator remains unchanged.

(Inherited from XmlWriter)
WriteProcessingInstruction(String, String) WriteProcessingInstruction(String, String) WriteProcessingInstruction(String, String) WriteProcessingInstruction(String, String)

当在派生类中被重写时,写出在名称和文本之间带有空格的处理指令,如下所示:<?name text?>。When overridden in a derived class, writes out a processing instruction with a space between the name and text as follows: <?name text?>.

(Inherited from XmlWriter)
WriteProcessingInstructionAsync(String, String) WriteProcessingInstructionAsync(String, String) WriteProcessingInstructionAsync(String, String) WriteProcessingInstructionAsync(String, String)

异步写出在名称和文本之间有空格的处理指令,如下所示:<?name text?>。Asynchronously writes out a processing instruction with a space between the name and text as follows: <?name text?>.

(Inherited from XmlWriter)
WriteQualifiedName(String, String) WriteQualifiedName(String, String) WriteQualifiedName(String, String) 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.

(Inherited from XmlWriter)
WriteQualifiedName(XmlDictionaryString, XmlDictionaryString) WriteQualifiedName(XmlDictionaryString, XmlDictionaryString) WriteQualifiedName(XmlDictionaryString, XmlDictionaryString) WriteQualifiedName(XmlDictionaryString, XmlDictionaryString)

写出命名空间限定的名称。Writes out the namespace-qualified name. 此方法查找位于给定命名空间范围内的前缀。This method looks up the prefix that is in scope for the given namespace.

WriteQualifiedNameAsync(String, String) WriteQualifiedNameAsync(String, String) WriteQualifiedNameAsync(String, String) WriteQualifiedNameAsync(String, String)

异步写出命名空间限定的名称。Asynchronously writes out the namespace-qualified name. 此方法查找位于给定命名空间范围内的前缀。This method looks up the prefix that is in scope for the given namespace.

(Inherited from XmlWriter)
WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32)

当在派生类中被重写时,从字符缓冲区手动写入原始标记。When overridden in a derived class, writes raw markup manually from a character buffer.

(Inherited from XmlWriter)
WriteRaw(String) WriteRaw(String) WriteRaw(String) WriteRaw(String)

当在派生类中被重写时,从字符串手动写入原始标记。When overridden in a derived class, writes raw markup manually from a string.

(Inherited from XmlWriter)
WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32) WriteRawAsync(Char[], Int32, Int32)

从字符缓冲区手动异步写入原始标记。Asynchronously writes raw markup manually from a character buffer.

(Inherited from XmlWriter)
WriteRawAsync(String) WriteRawAsync(String) WriteRawAsync(String) WriteRawAsync(String)

从字符串手动异步写入原始标记。Asynchronously writes raw markup manually from a string.

(Inherited from XmlWriter)
WriteStartAttribute(String) WriteStartAttribute(String) WriteStartAttribute(String) WriteStartAttribute(String)

写入具有指定本地名称的属性的开头。Writes the start of an attribute with the specified local name.

(Inherited from XmlWriter)
WriteStartAttribute(String, String) WriteStartAttribute(String, String) WriteStartAttribute(String, String) WriteStartAttribute(String, String)

写入具有指定本地名称和命名空间 URI 的属性的开头。Writes the start of an attribute with the specified local name and namespace URI.

(Inherited from XmlWriter)
WriteStartAttribute(String, String, String) WriteStartAttribute(String, String, String) WriteStartAttribute(String, String, String) WriteStartAttribute(String, String, String)

当在派生类中被重写时,写入具有指定的前缀、本地名称和命名空间 URI 的属性的开头。When overridden in a derived class, writes the start of an attribute with the specified prefix, local name, and namespace URI.

(Inherited from XmlWriter)
WriteStartAttribute(String, XmlDictionaryString, XmlDictionaryString) WriteStartAttribute(String, XmlDictionaryString, XmlDictionaryString) WriteStartAttribute(String, XmlDictionaryString, XmlDictionaryString) WriteStartAttribute(String, XmlDictionaryString, XmlDictionaryString)

写入具有指定前缀、本地名称和命名空间 URI 的属性的起始内容。Writes the start of an attribute with the specified prefix, local name, and namespace URI.

WriteStartAttribute(XmlDictionaryString, XmlDictionaryString) WriteStartAttribute(XmlDictionaryString, XmlDictionaryString) WriteStartAttribute(XmlDictionaryString, XmlDictionaryString) WriteStartAttribute(XmlDictionaryString, XmlDictionaryString)

写入具有指定本地名称和命名空间 URI 的属性的起始内容。Writes the start of an attribute with the specified local name, and namespace URI.

WriteStartAttributeAsync(String, String, String) WriteStartAttributeAsync(String, String, String) WriteStartAttributeAsync(String, String, String) WriteStartAttributeAsync(String, String, String)

异步写入具有指定前缀、本地名称和命名空间 URI 的属性的开头。Asynchronously writes the start of an attribute with the specified prefix, local name, and namespace URI.

(Inherited from XmlWriter)
WriteStartDocument() WriteStartDocument() WriteStartDocument() WriteStartDocument()

当在派生类中被重写时,写入版本为“1.0”的 XML 声明。When overridden in a derived class, writes the XML declaration with the version "1.0".

(Inherited from XmlWriter)
WriteStartDocument(Boolean) WriteStartDocument(Boolean) WriteStartDocument(Boolean) WriteStartDocument(Boolean)

当在派生类中被重写时,写入版本为“1.0”的 XML 声明和独立的属性。When overridden in a derived class, writes the XML declaration with the version "1.0" and the standalone attribute.

(Inherited from XmlWriter)
WriteStartDocumentAsync() WriteStartDocumentAsync() WriteStartDocumentAsync() WriteStartDocumentAsync()

异步写入版本为“1.0”的 XML 声明。Asynchronously writes the XML declaration with the version "1.0".

(Inherited from XmlWriter)
WriteStartDocumentAsync(Boolean) WriteStartDocumentAsync(Boolean) WriteStartDocumentAsync(Boolean) WriteStartDocumentAsync(Boolean)

异步写入版本为“1.0”的 XML 声明和独立的属性。Asynchronously writes the XML declaration with the version "1.0" and the standalone attribute.

(Inherited from XmlWriter)
WriteStartElement(String) WriteStartElement(String) WriteStartElement(String) WriteStartElement(String)

当在派生类中被重写时,写出具有指定的本地名称的开始标记。When overridden in a derived class, writes out a start tag with the specified local name.

(Inherited from XmlWriter)
WriteStartElement(String, String) WriteStartElement(String, String) WriteStartElement(String, String) WriteStartElement(String, String)

当在派生类中被重写时,写入指定的开始标记并将其与给定的命名空间关联起来。When overridden in a derived class, writes the specified start tag and associates it with the given namespace.

(Inherited from XmlWriter)
WriteStartElement(String, String, String) WriteStartElement(String, String, String) WriteStartElement(String, String, String) WriteStartElement(String, String, String)

当在派生类中被重写时,写入指定的开始标记并将其与给定的命名空间和前缀关联起来。When overridden in a derived class, writes the specified start tag and associates it with the given namespace and prefix.

(Inherited from XmlWriter)
WriteStartElement(String, XmlDictionaryString, XmlDictionaryString) WriteStartElement(String, XmlDictionaryString, XmlDictionaryString) WriteStartElement(String, XmlDictionaryString, XmlDictionaryString) WriteStartElement(String, XmlDictionaryString, XmlDictionaryString)

写入指定的开始标记并将其与给定的命名空间和前缀关联起来。Writes the specified start tag and associates it with the given namespace and prefix.

WriteStartElement(XmlDictionaryString, XmlDictionaryString) WriteStartElement(XmlDictionaryString, XmlDictionaryString) WriteStartElement(XmlDictionaryString, XmlDictionaryString) WriteStartElement(XmlDictionaryString, XmlDictionaryString)

写入指定的开始标记并将其与给定的命名空间关联起来。Writes the specified start tag and associates it with the given namespace.

WriteStartElementAsync(String, String, String) WriteStartElementAsync(String, String, String) WriteStartElementAsync(String, String, String) WriteStartElementAsync(String, String, String)

异步写入指定的开始标记并将其与给定的命名空间和前缀关联起来。Asynchronously writes the specified start tag and associates it with the given namespace and prefix.

(Inherited from XmlWriter)
WriteString(String) WriteString(String) WriteString(String) WriteString(String)

当在派生类中被重写时,写入给定的文本内容。When overridden in a derived class, writes the given text content.

(Inherited from XmlWriter)
WriteString(XmlDictionaryString) WriteString(XmlDictionaryString) WriteString(XmlDictionaryString) WriteString(XmlDictionaryString)

写入给定的文本内容。Writes the given text content.

WriteStringAsync(String) WriteStringAsync(String) WriteStringAsync(String) WriteStringAsync(String)

异步写入给定的文本内容。Asynchronously writes the given text content.

(Inherited from XmlWriter)
WriteSurrogateCharEntity(Char, Char) WriteSurrogateCharEntity(Char, Char) WriteSurrogateCharEntity(Char, Char) WriteSurrogateCharEntity(Char, Char)

当在派生类中被重写时,为代理项字符对生成并写入代理项字符实体。When overridden in a derived class, generates and writes the surrogate character entity for the surrogate character pair.

(Inherited from XmlWriter)
WriteSurrogateCharEntityAsync(Char, Char) WriteSurrogateCharEntityAsync(Char, Char) WriteSurrogateCharEntityAsync(Char, Char) WriteSurrogateCharEntityAsync(Char, Char)

为代理项字符对异步生成并写入代理项字符实体。Asynchronously generates and writes the surrogate character entity for the surrogate character pair.

(Inherited from XmlWriter)
WriteTextNode(XmlDictionaryReader, Boolean) WriteTextNode(XmlDictionaryReader, Boolean) WriteTextNode(XmlDictionaryReader, Boolean) WriteTextNode(XmlDictionaryReader, Boolean)

写入 XmlDictionaryReader 当前定位在的文本节点。Writes the text node that an XmlDictionaryReader is currently positioned on.

WriteValue(Boolean) WriteValue(Boolean) WriteValue(Boolean) WriteValue(Boolean)

写入 Boolean 值。Writes a Boolean value.

(Inherited from XmlWriter)
WriteValue(DateTime) WriteValue(DateTime) WriteValue(DateTime) WriteValue(DateTime)

写入 DateTime 值。Writes a DateTime value.

(Inherited from XmlWriter)
WriteValue(DateTimeOffset) WriteValue(DateTimeOffset) WriteValue(DateTimeOffset) WriteValue(DateTimeOffset)

写入 DateTimeOffset 值。Writes a DateTimeOffset value.

(Inherited from XmlWriter)
WriteValue(Decimal) WriteValue(Decimal) WriteValue(Decimal) WriteValue(Decimal)

写入 Decimal 值。Writes a Decimal value.

(Inherited from XmlWriter)
WriteValue(Double) WriteValue(Double) WriteValue(Double) WriteValue(Double)

写入 Double 值。Writes a Double value.

(Inherited from XmlWriter)
WriteValue(Guid) WriteValue(Guid) WriteValue(Guid) WriteValue(Guid)

写入 Guid 值。Writes a Guid value.

WriteValue(Int32) WriteValue(Int32) WriteValue(Int32) WriteValue(Int32)

写入 Int32 值。Writes a Int32 value.

(Inherited from XmlWriter)
WriteValue(Int64) WriteValue(Int64) WriteValue(Int64) WriteValue(Int64)

写入 Int64 值。Writes a Int64 value.

(Inherited from XmlWriter)
WriteValue(IStreamProvider) WriteValue(IStreamProvider) WriteValue(IStreamProvider) WriteValue(IStreamProvider)

IStreamProvider 写入值。Writes a value from an IStreamProvider.

WriteValue(Object) WriteValue(Object) WriteValue(Object) WriteValue(Object)

写入对象值。Writes the object value.

(Inherited from XmlWriter)
WriteValue(Single) WriteValue(Single) WriteValue(Single) WriteValue(Single)

写入一个单精度浮点数。Writes a single-precision floating-point number.

(Inherited from XmlWriter)
WriteValue(String) WriteValue(String) WriteValue(String) WriteValue(String)

写入 String 值。Writes a String value.

(Inherited from XmlWriter)
WriteValue(TimeSpan) WriteValue(TimeSpan) WriteValue(TimeSpan) WriteValue(TimeSpan)

写入 TimeSpan 值。Writes a TimeSpan value.

WriteValue(UniqueId) WriteValue(UniqueId) WriteValue(UniqueId) WriteValue(UniqueId)

写入唯一 Id 值。Writes a Unique Id value.

WriteValue(XmlDictionaryString) WriteValue(XmlDictionaryString) WriteValue(XmlDictionaryString) WriteValue(XmlDictionaryString)

写入 XmlDictionaryString 值。Writes a XmlDictionaryString value.

WriteValueAsync(IStreamProvider) WriteValueAsync(IStreamProvider) WriteValueAsync(IStreamProvider) WriteValueAsync(IStreamProvider)

异步写入一个来自 IStreamProvider 的数值。Asynchronously writes a value from an IStreamProvider.

WriteWhitespace(String) WriteWhitespace(String) WriteWhitespace(String) WriteWhitespace(String)

当在派生类中被重写时,写出给定的空白区域。When overridden in a derived class, writes out the given white space.

(Inherited from XmlWriter)
WriteWhitespaceAsync(String) WriteWhitespaceAsync(String) WriteWhitespaceAsync(String) WriteWhitespaceAsync(String)

异步写出给定的空白区域。Asynchronously writes out the given white space.

(Inherited from XmlWriter)
WriteXmlAttribute(String, String) WriteXmlAttribute(String, String) WriteXmlAttribute(String, String) WriteXmlAttribute(String, String)

在当前节点中写入标准的 XML 属性。Writes a standard XML attribute in the current node.

WriteXmlAttribute(XmlDictionaryString, XmlDictionaryString) WriteXmlAttribute(XmlDictionaryString, XmlDictionaryString) WriteXmlAttribute(XmlDictionaryString, XmlDictionaryString) WriteXmlAttribute(XmlDictionaryString, XmlDictionaryString)

在当前节点中写入 XML 属性。Writes an XML attribute in the current node.

WriteXmlnsAttribute(String, String) WriteXmlnsAttribute(String, String) WriteXmlnsAttribute(String, String) WriteXmlnsAttribute(String, String)

写入命名空间声明属性。Writes a namespace declaration attribute.

WriteXmlnsAttribute(String, XmlDictionaryString) WriteXmlnsAttribute(String, XmlDictionaryString) WriteXmlnsAttribute(String, XmlDictionaryString) WriteXmlnsAttribute(String, XmlDictionaryString)

写入命名空间声明属性。Writes a namespace declaration attribute.

显式界面实现

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

有关此成员的说明,请参见 Dispose()For a description of this member, see Dispose().

(Inherited from XmlWriter)

适用于