That's the actual error message?
At any rate if the "you" in that question is you plus a text editor, then you aren't doing it right. Or if you're using standard
Java I/O classes to output XML, then you aren't doing it right either. If I knew what you meant by "special characters", and what you were doing for them, I might be able to suggest a change. But I will just suggest you read the section in your XML book about escaping. It's most likely near the beginning of the book.