Tag Archives: LINQ to XML

Generate xml document with elements and attributes using LINQ to XML

To generate a XML document with elements and attributes is easy by using LINQ to XML. LINQ to XML provides the XDocument, XElement and XAttribute classes,with the help of XElement class we can create XML content and create a new XML file using the XDocument class. Continue reading Generate xml document with elements and attributes using LINQ to XML

Create the XML document using LINQ to XML in C#

XML document is widely used file in the projects where we can store the small or big data such as configuration settings or last used data on the form. .Net framework provides various way to create the XML files (such as DataSet.WriteXML), but my concern it is so easy to create the XML document by using the LINQ to XML. Continue reading Create the XML document using LINQ to XML in C#