Thursday, June 02, 2005

org.xml.sax.SAXParseException: XML declaration may only begin entities.

its bout a strange exception and the way how i get it resolved.i created a XML file without taking help of any editor like XML spy or et all.the eror org.xml.sax.SAXParseException: XML declaration may only begin entities. was coming while i was trying to parse it using SAX.the fault was that i just started coding that XML file from the second line keeping the first line blank.and the information ?xml version="1.0" encoding="UTF-8"? should must be the first line.yah..i made it as first line.problem resolved.

Labels:

3 Comments:

Anonymous Anonymous said...

i am also trying to solve the same problem but i have done all proper formating of the xml file but it still shows SAXParseException:xml declaration may only begin entities.

6:21 PM  
Anonymous Anonymous said...

i am also trying to solve the same problem but i have done all proper formating of the xml file but it still shows SAXParseException:xml declaration may only begin entities.

6:21 PM  
Anonymous Anonymous said...

I have the same problem with you ,but when I follows your suggestion,it still does not work,so could you help me?Thanks.

10:57 AM  

Post a Comment

<< Home