I thought I would share my thoughts, since I was having the same problem (even though this thread is very old).
I did what Ramamoorthy Govindaraj suggested (except my input/output streams used files instead of Strings because my XML document was very large and storing the entire document in memory would have been inefficient):
But that still didn't work. When I opened the file in a text editor (Notepad++), I saw a question mark character at the very beginning of the file. After I deleted that character, I could parse the file successfully.
Working with encodings is annoying because text files are supposed to be simple.