This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Parsing Exception with JAXB 1.0.6 : XML files containing UTF-8 characters
sumitha sudhakar
Greenhorn
Joined: Aug 09, 2010
Posts: 21
posted
0
Hi,
My application is using JAXB 1.0.6 and JDK 1.4, When am trying to parse some XML files which contatining some UTF-8 characters, parsing has failed.
Here is the code which am using
this throws the following exception:
**************************************
javax.xml.bind.UnmarshalException: Content is not allowed in prolog.
- with linked exception:
[org.xml.sax.SAXParseException: Content is not allowed in prolog.]
Please help me out. how can i unmarshall an XML file having UTF 8 char encoded.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
1
posted
0
Why are you so sure the problem is UTF-8?
Content is not allowed in prolog.
can simply mean the first character in the stream is not a < - the parser expects the first line to start <?xml
If this was my problem I would take a close look at the initial characters.