- XDocument – Method which creates the XML document
- XDeclaration – Allows you to set the declaration at the top of the file.
- XElement – Creates a hierarchical element structure
- XAttribute – Creates any attributes related to an element.
LINQ to XML is a simple toolset that allows developers to easily interact with XML, whether it be in file form of on the wire in string form. Write to an XML file There are a few methods within the System.Xml.Linq namespace which make this interaction a breeze. The four main ones are:-