Hi, In my program, a text file is read in, and certain parts of it are written to a XML file. There are special characters(e.g. &) that need to be escaped, so I need to escape all of them.
How can I manage to do this?

Sorry, i'm a newer programmer so i am not sure what you mean by the & needs to be escaped, but if you take a look at my thread about regex you may find it helpful. Parsing Lines of a File



I forgot about CDATA, which keeps text in exactly the same format :)