Solved

XML parsing error(Encoing type)

Posted on 2001-07-02
2
686 Views
Last Modified: 2013-11-23
hi !!!!
i have a xml document which contains some special characters.(for exm ?).
if i give it DocumentBuilder.parse(File xmlfile) it gives an exception saying--
org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8 character beginning with 0xae" (line number may b
e too low).
can anybody help me out solving this problem??
thanks in advance

siddharth
0
Comment
Question by:spatnaik
2 Comments
 
LVL 2

Accepted Solution

by:
Prasanna_Hebbar earned 100 total points
ID: 6251369
It is the job of xml author to make a document well formed. It can't find the characters like '&', '<', '>',  double quotes. These characters should be represented in xml as &amp;, &lt;, &gt;, etc.

So in this case if you are creating the xml document, then you should make sure that the xml is well formed. You can catch the exception and inform the user that the xml is not well formed and ask him to replace these characters.

NOTE : I don't think ? is a special character. I used xerces parser. I am able to parse the data which contains question mark.
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 9017833
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to Prasanna_Hebbar]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
map related example 6 55
oracle 11g 23 106
Is there a simpler dropbox system? 10 34
Selenium docs api java index 3 48
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question