How to read xml file from windows form application in c#? I am new in this .net framework prograaming. I have 3.5 .net framework please give simple program for it
+2
A:
If you're using .Net 3.5 or later, you can use the XDocument class to read and write XML.
If you're still in .Net 2.0, you can use the XmlDocument class.
MusiGenesis
2009-09-13 17:21:57
+2
A:
The simplest way to read an XML file into memory is to use the XDocument.Load method. This method takes a file path and returns an XDocument instance which can be used to query the contents
XDocument doc = XDocument.Load(@"c:\path\to\the\xmlfile.xml");
If you're working with an older API, you may need to use the XmlDocument class. It can be loaded in the following way
XmlDocument doc = new XmlDocument();
doc.Load(@"c:\path\to\the\xmlfile.xml");
JaredPar
2009-09-13 17:48:55