• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SAXParseException: Document root element is missing

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic