Definition
Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.XmlSyntax
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.
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 writexsi:nil or xsi:type.
Related APIs
- CloudNimble.Text.Xml.XmlNamespaces
- CloudNimble.Text.Xml.XmlElement
- CloudNimble.Text.Xml.Utf8XmlWriter