jssong2000
asked on
How to read an unknown xml file in C#
I am new in XML.
I want to read a xml file from directory C:\incoming\myproject. The xml file coould be any name. Any help or comments will be very appreciated!!!
I want to read a xml file from directory C:\incoming\myproject. The xml file coould be any name. Any help or comments will be very appreciated!!!
ASKER
I got an error using ReadXMLFile, what I need to do? Thank you!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could also do the following:
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/App_Data/MyXMLFile.xml"));
ASKER
It worked. Thank you!!!
foreach (var item in Directory.GetFiles(@"C:\in
{
ReadXMLFile(item.ToString(
}