Skip to main content

Definition

Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml

Syntax

Summary

Provides the local names of the XML Schema instance attributes that XmlEssentials reads and writes. This class cannot be inherited.

Usage

XmlAttributes holds the local names of the two XML Schema instance attributes that XmlEssentials reads and writes: Nil ("nil", for xsi:nil) and Type ("type", for xsi:type). The constants are local names only. Pair them with the XmlNamespaces.Xsi namespace URI so that a lookup matches the attribute whatever prefix the document uses.
The code produces the following output:
To find out whether an element is nil, read XmlElement.IsNil instead of looking for the attribute yourself. For how the serializer uses these attributes, see Handle null and nil and Polymorphism. View the complete sample on GitHub

Remarks

The constants are local names only. Bind them to the XmlNamespaces.Xsi namespace when you write xsi:nil or xsi:type.
  • CloudNimble.Text.Xml.XmlNamespaces
  • CloudNimble.Text.Xml.XmlElement
  • CloudNimble.Text.Xml.Utf8XmlWriter