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: Technical_HowTo_Java
3 Comments:
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.
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.
I have the same problem with you ,but when I follows your suggestion,it still does not work,so could you help me?Thanks.
Post a Comment
<< Home