OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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 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).