File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes JAXB parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAXB parser" Watch "JAXB parser" New topic

JAXB parser

Stefan Gerber
Ranch Hand

Joined: Mar 08, 2008
Posts: 33
I use jaxb to generate an xml file. Now it happens that the xml file looks different depending on the computer (installation) i run the programm.

The structure of the two xml file is the same but in one file the Tag "xmlns="" " is missing in the root element.
If i want marshal the xml file again i get the following exception:

javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"Document"). Expected elements are <{}Document>

Any idea why this can happen? I think that it might be possible that an other parser is used to generate the xml file. How can i find out which parser is used by jaxb?
I agree. Here's the link:
subject: JAXB parser
It's not a secret anymore!