Hello there,
I am having trouble loading the xml files i got from a particular path.
I got the idea from this particular code :
and i want to be able to convert it to C#.
The filenames of files found using Directory.GetFiles the are successfully displayed withLabel1.Text.
however with :
i get an "no instance of an object".
I hope u .NET gurus out there can help me on this.
Thanks in advance!
I am having trouble loading the xml files i got from a particular path.
I got the idea from this particular code :
Code:
Dim xmlReport As New XmlDocument
For Each reportpath In IO.Directory.GetFiles(MapPath("report/"), "*.xml")
xmlReport.Load(reportpath)
("report/@name").Value)
Next
and i want to be able to convert it to C#.
The filenames of files found using Directory.GetFiles the are successfully displayed withLabel1.Text.
Code:
XmlDocument xmlReport ;
string reportPath = MapPath("Report/");
string[] reportFiles = Directory.GetFiles(reportPath, "*.xml");
foreach (string file in reportFiles)
{
Label1.Text += file + "<br>";
}
however with :
Code:
XmlDocument xmlReport ;
string reportPath = MapPath("Report/");
string[] reportFiles = Directory.GetFiles(reportPath, "*.xml");
foreach (string file in reportFiles)
{
Xml.Load(file);
}
I hope u .NET gurus out there can help me on this.
Thanks in advance!