[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: UTF-8 BOM

  • From: Michael Brennan <Michael_Brennan@a...>
  • To: 'Richard Tobin' <richard@c...>
  • Date: Thu, 14 Jun 2001 19:22:39 -0700

java bom
Well, I recreated the test case I mentioned in an earlier message -- this
time with JAXP 1.1. Sun's parser does not properly deal with a UTF-8 BOM. I
get this exception when trying to load the document:

org.xml.sax.SAXParseException: Document root element is missing.
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
        at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
        at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
        at com.allegis.openlinks.test.GUITester2.main(GUITester2.java:21)

In spite of the misleading error message, the document is well-formed. The
same error message occurs regardless of whether an XML declaration is
present (I got the same error message with both your doc.xml and docx.xml
test cases). The same document without the BOM parses fine.

I believe I recall having problems with Aelfred in the past with this same
issue (I was using the modified Aelfred included in SAXON).

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.