XmlDeclaration.WriteTo(XmlWriter) 方法

定义

将节点保存到指定的 XmlWriterSaves the node to the specified XmlWriter.

public:
 override void WriteTo(System::Xml::XmlWriter ^ w);
public override void WriteTo (System.Xml.XmlWriter w);
override this.WriteTo : System.Xml.XmlWriter -> unit
Public Overrides Sub WriteTo (w As XmlWriter)

参数

w
XmlWriter

要保存到其中的 XmlWriterThe XmlWriter to which you want to save.

注解

编码和独立属性的值由 EncodingStandalone 属性确定。The value of the encoding and standalone attributes are determined by the Encoding and Standalone properties. 如果未设置任何属性,则不会写入相应的属性。If either of the properties is not set, the corresponding attribute is not written. 版本属性始终写出,值为1.0。The version attribute is always written out with a value of 1.0.

适用于