Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Document root element is missing???? No it isnt.

843834Mar 5 2004 — edited Feb 20 2006
Hi everyone, this is probably an age old problem and someone somewhere in this forum has the answer, but I cant find it. I get the error below from a well formed XML document. If I put it into IE it shows it with no problems. But when java has a go at it I get the following error.

Error reading XMLorg.xml.sax.SAXParseException: Document root element is missing
.
org.xml.sax.SAXParseException: Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at ImporterWorker.readManifest(ImporterWorker.java:645)
at ManifestFormatter.run(ManifestFormatter.java:100)

The file does contain European characters so do you think this has something to do with it. Should I put the document through a method that takes these chars out first. Please help.

All replies greatly appriciated.

v
(0)(0)
c (_)
~

Graham
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2006
Added on Mar 5 2004
37 comments
4,263 views