jQuery in Action, 2nd edition*
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 Android Security Essentials Live Lessons this week in the Android 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="http://test.com/namespace" " 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 <{http://test.com/namespace}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: http://aspose.com/file-tools
subject: JAXB parser
Similar Threads
Unmarshall with JAXB Error
Discrepancies between an XML file and the XSD it was generated from (via JAXB)
Getting elements from JDOM -two namespaces in XML?
wscompile generating a bad jax-rpc mapping file