This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAXB parser" Watch "JAXB parser" New topic
Author

JAXB parser

Stefan Gerber
Ranch Hand

Joined: Mar 08, 2008
Posts: 33
Hello,
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