my program needs to write some information into a log file.
now I use XML file as this log.
I was using XML object to create and add entries. but seems it will slow down the perfermance.bigger the file, longer it takes to add an entry.
so I decide to use file functions to do that.
I use "open" function to open the log file and use "print" function to add entry, log file format is still .xml .
however I have one more problem.
some msg contain "&", so when I write string like "blah blah & blah" into this log file.
then the XML file can't be dispalyed.
the error will be:
Whitespace is not allowed at this location. Error processing resource 'testing.XML'. Line...
blah blah & blah
-----------^
what should I do?
thanks in advance
now I use XML file as this log.
I was using XML object to create and add entries. but seems it will slow down the perfermance.bigger the file, longer it takes to add an entry.
so I decide to use file functions to do that.
I use "open" function to open the log file and use "print" function to add entry, log file format is still .xml .
however I have one more problem.
some msg contain "&", so when I write string like "blah blah & blah" into this log file.
then the XML file can't be dispalyed.
the error will be:
Whitespace is not allowed at this location. Error processing resource 'testing.XML'. Line...
blah blah & blah
-----------^
what should I do?
thanks in advance