LINQ to XML offers a dozen classes to create and parse
XML’s, here we shall see some of the important classes.
All the LINQ to XML classes are packed in the System.Xml.Linq Assembly
All the LINQ to XML classes are packed in the System.Xml.Linq Assembly
XDocument:
The XDocument class is used to add header information to the XML document, like
declaration, version information, style details, etc, it also embeds the Xml
elements, the XDocument class is not mandatory, can be used as and when
required.
The XDocument class contains methods to load and save
the XML files to the file system.
XElement:
The XElement class is the main class which is used to create XML structures, it
contains methods to create, update, delete XML Elements to an XML Structure.
XAttribute: The XAttribute class is similar to the XElement class, the difference is that the XAttribute class is used to manage attributes in an XML Structure.
Related Post
No comments:
Post a Comment