• Post Reply Bookmark Topic Watch Topic
  • New Topic

SAXParseException: Document root element is missing  RSS feed

 
Lakshmi Ramachandran
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,
I am getting the following error
org.xml.sax.SAXParseException: Document root element is missing
while building our application. Problem is the build file refers an XML which has Japanese character. If I remove those character the build is happening, which is not the right way. Herewith I am attaching the XML also. The XML is well formatted.
Kindly give me your suggestions to get rid of the problem. I am using Xalan 2.5.1.


The XML snippet is as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<translations>
<entry>
<key>SITE_TITLE</key>
<error_number />
<translation lang="en">Sites</translation>
<translation lang="en_US">Sites</translation>
<translation lang="ja">サイト</translation>
</entry>
<entry>
<key>CREATE_SITE_TITLE</key>
<error_number />
<translation lang="en">Add a Site</translation>
<translation lang="en_US">Add a Site</translation>
<translation lang="ja">サイトを追加</translation>
</entry>
</translations>


Please reply ASAP.

Thanks in advance!
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open your xml file using good IDE tools like XMLSPY and save your XML file again... this will make sure that your xml is fully based on UNICODE... this will let xalan to parse the xmlfile.

Will that help ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!