XDocument.NodeType Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the node type for this node.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Property Value
Type: System.Xml.XmlNodeTypeThe node type. For XDocument objects, this value is Document.
The following example shows the use of this property.
StringBuilder output = new StringBuilder(); // Note that this property uses XmlNodeType, which is in the System.Xml namespace. XDocument xmlTree = new XDocument( new XDeclaration("1.0", "utf-8", "yes"), new XElement("Root", "content") ); output.Append(xmlTree.NodeType + Environment.NewLine); OutputTextBlock.Text = output.ToString();
Show: