Mega Code Archive

 
Categories / C# / XML LINQ
 

XAttribute NodeType Property returns the node type for this node

using System; using System.Linq; using System.Xml; using System.Xml.Linq; using System.Collections; using System.Collections.Generic; public class MainClass {     public static void Main()     {         XElement root = new XElement("Root",             new XAttribute("Att", "content")         );         XAttribute att = root.FirstAttribute;         Console.WriteLine(att.NodeType);     } }