Definition
Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml Inheritance: System.EnumSyntax
Summary
Specifies the kind of XML node that an XmlElement or a XmlNode represents.Usage
XmlValueKind says what kind of node an XmlElement or an XmlNode is. Read it from XmlElement.ValueKind or XmlNode.ValueKind before you treat a node as an element or read its value.
ValueKind, and the second is the matching XmlTokenType.
Considerations
Not every value is reported by both DOMs:- In a document, an element has one of three kinds, so a test for elements must accept
Element,EmptyElement, andNil. An element that is nil reportsNilwhether it’s written as<e xsi:nil="true"/>or with an end tag; readXmlElement.IsEmptyElementfor the form. - A document keeps comments and the white space between elements by default, so
CommentandTextappear among the children of an indented element unless you parse withXmlCommentHandling.SkipandXmlWhitespaceHandling.Insignificant.XmlNode.Parsekeeps both as well. - The declaration of a parsed document is
XmlDocument.Declaration, not a node with theXmlDeclarationkind.
Values
Related APIs
- CloudNimble.Text.Xml.XmlElement
- CloudNimble.Text.Xml.XmlTokenType
- CloudNimble.Text.Xml.XmlDocument
- CloudNimble.Text.Xml.Nodes.XmlNode