XmlSerializationWriter.WriteElementLiteral 方法

定義

指示物件 XmlWriter 在命名的 XML 元素的主體中寫入 XmlNode 物件。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

protected:
 void WriteElementLiteral(System::Xml::XmlNode ^ node, System::String ^ name, System::String ^ ns, bool isNullable, bool any);
protected void WriteElementLiteral(System.Xml.XmlNode? node, string name, string? ns, bool isNullable, bool any);
protected void WriteElementLiteral(System.Xml.XmlNode node, string name, string ns, bool isNullable, bool any);
member this.WriteElementLiteral : System.Xml.XmlNode * string * string * bool * bool -> unit
Protected Sub WriteElementLiteral (node As XmlNode, name As String, ns As String, isNullable As Boolean, any As Boolean)

參數

node
XmlNode

要寫入的 XML 節點,可能是子 XML 元素。

name
String

要寫入的父 XML 元素的本地名稱。

ns
String

要寫入的父 XML 元素的命名空間。

isNullable
Boolean

true 若要序列 xsi:nil='true' 化的物件為 null;,則 false

any
Boolean

true用以表示該節點(若為 XML 元素)遵守 XML Schema any 元素宣告;否則,。 false

備註

XmlSerializationWriter 的受保護成員僅供內部在 .NET Framework XML 序列化基礎架構中使用的衍生類別使用。

WriteElementLiteral此方法僅在撰寫可定義於 XML 架構文件中的字面 XML 時被呼叫。

適用於