M
Mads Westen
Hi,
I'm parsing some XML files, and converting them to CSV.
I got x number of XML files in a directory, these files do I need to be
converted and written to the same CSV file.
My problem is that my csv file only contains the data from the last XML file
parsed...
I got the following code for creating of my StreamWriter:
public OrderFileCreator(string fileName)
{
this.fileName = fileName;
if(File.Exists(this.fileName))
{
fl = File.OpenWrite(this.fileName);
fs = new StreamWriter(fl, Encoding.GetEncoding( 850 ));
}
if(!File.Exists(this.fileName))
{
fl = File.Create(this.fileName);
fs = new StreamWriter(fl, Encoding.GetEncoding( 850 ));
}
}
Best regards
Mads
I'm parsing some XML files, and converting them to CSV.
I got x number of XML files in a directory, these files do I need to be
converted and written to the same CSV file.
My problem is that my csv file only contains the data from the last XML file
parsed...
I got the following code for creating of my StreamWriter:
public OrderFileCreator(string fileName)
{
this.fileName = fileName;
if(File.Exists(this.fileName))
{
fl = File.OpenWrite(this.fileName);
fs = new StreamWriter(fl, Encoding.GetEncoding( 850 ));
}
if(!File.Exists(this.fileName))
{
fl = File.Create(this.fileName);
fs = new StreamWriter(fl, Encoding.GetEncoding( 850 ));
}
}
Best regards
Mads