Tutorial by Examples

public static void Main() { var xml = new XmlDocument(); var root = xml.CreateElement("element"); // Creates an attribute, so the element will now be "<element attribute='value' />" root.SetAttribute("attribute", "value"); ...
An example XML file <Sample> <Account> <One number="12"/> <Two number="14"/> </Account> <Account> <One number="14"/> <Two number="16"/> </Account&gt...
There are several ways interact with an Xml file. Xml Document XDocument XmlReader/XmlWriter Before LINQ to XML we were used XMLDocument for manipulations in XML like adding attributes, elements and so on. Now LINQ to XML uses XDocument for the same kind of thing. Syntaxes are much easie...

Page 1 of 1