XmlSerializationWriter.WriteNullTagLiteral 方法

定义

指示 XmlNode 写入一个具有 xsi:nil='true' 属性的 XML 元素。Instructs XmlNode to write an XML element with an xsi:nil='true' attribute.

重载

WriteNullTagLiteral(String)

此 API 支持产品基础结构,不能在代码中直接使用。

写入一个具有 xsi:nil='true' 属性的 XML 元素。Writes an XML element with an xsi:nil='true' attribute.

WriteNullTagLiteral(String, String)

此 API 支持产品基础结构,不能在代码中直接使用。

写入一个具有 xsi:nil='true' 属性的 XML 元素。Writes an XML element with an xsi:nil='true' attribute.

WriteNullTagLiteral(String)

写入一个具有 xsi:nil='true' 属性的 XML 元素。Writes an XML element with an xsi:nil='true' attribute.

此 API 支持产品基础结构,不能在代码中直接使用。

protected:
 void WriteNullTagLiteral(System::String ^ name);
protected void WriteNullTagLiteral (string? name);
protected void WriteNullTagLiteral (string name);
member this.WriteNullTagLiteral : string -> unit
Protected Sub WriteNullTagLiteral (name As String)

参数

name
String

要写入的 XML 元素的本地名称。The local name of the XML element to write.

注解

的受保护成员 XmlSerializationWriter 仅供在 .NET FRAMEWORK XML 序列化基础结构内部使用的派生类使用。The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

当设置为时 truenil XML 架构实例命名空间中的属性 (缩写 xsi) 指示 null 值。When set to true, the nil attribute from the XML Schema instance namespace (abbreviated xsi) indicates a null value.

WriteNullTagLiteral只有在编写可在 XML 架构文档中定义的文本 XML 时,才会调用方法。The WriteNullTagLiteral method is called only when writing literal XML that can be defined in an XML Schema document.

适用于

WriteNullTagLiteral(String, String)

写入一个具有 xsi:nil='true' 属性的 XML 元素。Writes an XML element with an xsi:nil='true' attribute.

此 API 支持产品基础结构,不能在代码中直接使用。

protected:
 void WriteNullTagLiteral(System::String ^ name, System::String ^ ns);
protected void WriteNullTagLiteral (string? name, string? ns);
protected void WriteNullTagLiteral (string name, string ns);
member this.WriteNullTagLiteral : string * string -> unit
Protected Sub WriteNullTagLiteral (name As String, ns As String)

参数

name
String

要写入的 XML 元素的本地名称。The local name of the XML element to write.

ns
String

要写入的 XML 元素的命名空间。The namespace of the XML element to write.

注解

的受保护成员 XmlSerializationWriter 仅供在 .NET FRAMEWORK XML 序列化基础结构内部使用的派生类使用。The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

当设置为时 truenil XML 架构实例命名空间中的属性 (缩写 xsi) 指示 null 值。When set to true, the nil attribute from the XML Schema instance namespace (abbreviated xsi) indicates a null value.

WriteNullTagLiteral只有在编写可在 XML 架构文档中定义的文本 XML 时,才会调用方法。The WriteNullTagLiteral method is called only when writing literal XML that can be defined in an XML Schema document.

适用于