Quantcast
Channel: Reading XML file using LINQ to XML
Browsing index pages (3 articles)

Reading XML file using LINQ to XML

<?xml version="1.0" encoding="utf-8"?><appSettings><add key="a" value="b"/><add key="c" value="d"/></appSettings> How can I read the values of key a and c using Linq to...

View Article


Reading XML file using LINQ to XML

XDocument objDoc = XDocument.Load(@"C:\Sites\stringEx\App.config"); foreach (var el in objDoc.Descendants("appSettings").Descendants("add")) { Console.WriteLine("{0} {1} ", el.Attribute("key").Value,...

View Article


Reading XML file using LINQ to XML

Hi,Please try to refer to the following code:XDocument objDoc = XDocument.Load(Server.MapPath("XMLFile1.xml")); var data = from item in objDoc.Descendant("appSettings").Descendants("add") select...

View Article
Browsing index pages (3 articles)


Latest Images