C# Linq XML - sitapriyanka/aws GitHub Wiki

For Pragim xml slidesUsing XDocument We can create to a file and Load the documents from a file. 1. * XDocument, 1. * XDeclaration 1. * XComment 1. * XElement 1. * XAttribute are some classes that are required to create xml class.

We can use linq to get and update xelements.

To get the second student name return XDocument.Load(@"D:\c#\LinqXml\Students.xml").Descendants("Student").ElementAt(2) .Element("Name").Value;

XDocument.Load("FilePath") to load XML file into system. XSchema To get schema from XSD and use XDocument.Validate(Schema, Xdocument) to validate document against schema.