Upraviť

Zdieľať cez


XmlSerializationWriter.WriteElementLiteral Method

Definition

Instructs an XmlWriter object to write an XmlNode object within the body of a named XML element.

This API supports the product infrastructure and is not intended to be used directly from your code.

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)

Parameters

node
XmlNode

The XML node to write, possibly a child XML element.

name
String

The local name of the parent XML element to write.

ns
String

The namespace of the parent XML element to write.

isNullable
Boolean

true to write an xsi:nil='true' attribute if the object to serialize is null; otherwise, false.

any
Boolean

true to indicate that the node, if an XML element, adheres to an XML Schema any element declaration; otherwise, false.

Remarks

The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

The WriteElementLiteral method is called only when writing literal XML that can be defined in an XML Schema document.

Applies to