[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: UTF-8 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|