Solved

XML parsing error(Encoing type)

Posted on 2001-07-02
2
684 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 74
mapAB Challlenge 35 123
github account with ecipse 1 42
difference of if loops 23 38
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now