C
CGuy
Hi,
I'm trying to write a log file (in XML) using XMLTextWriter. Each time
my application runs, certain events are logged and the same log file should
be updated. The very time, the log gets saved correctly, bu the next time I
try to write to the same XML file using XMLTextReader, the file gets
corrupted -
The first time, I write the log, I get the following XML in the file
<logs>
<log>
<item>This is the log</item>
</log>
</logs>
The next time I run the application, the log file gets corrupted with a
question mark.
<logs>
<log>
<item>This is the log</item>
</log>
</logs>?<log>
<item>This is another log</item>
And the code throws a run time error saying "There was no start tag to
open".
Can u help me?
Regards,
CGuy
I'm trying to write a log file (in XML) using XMLTextWriter. Each time
my application runs, certain events are logged and the same log file should
be updated. The very time, the log gets saved correctly, bu the next time I
try to write to the same XML file using XMLTextReader, the file gets
corrupted -
The first time, I write the log, I get the following XML in the file
<logs>
<log>
<item>This is the log</item>
</log>
</logs>
The next time I run the application, the log file gets corrupted with a
question mark.
<logs>
<log>
<item>This is the log</item>
</log>
</logs>?<log>
<item>This is another log</item>
And the code throws a run time error saying "There was no start tag to
open".
Can u help me?
Regards,
CGuy