aspose file tools*
The moose likes XML and Related Technologies and the fly likes Problem with JAXB if new tag is added to XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Problem with JAXB if new tag is added to XML" Watch "Problem with JAXB if new tag is added to XML" New topic
Author

Problem with JAXB if new tag is added to XML

Nisha lakshminaraya
Ranch Hand

Joined: Feb 23, 2010
Posts: 30
Hi,

I have XSD file where i am defining all the XML tags.I am compiling schema to generate all the java class's. I have added new tag to XML and not defined same in XSD. But when i am trying to unmarshall i am getting an error saying "Element not found"

Please help me to solve this

Thanks,
Nisha
Sverre Moe
Ranch Hand

Joined: Jul 10, 2007
Posts: 110
Why don't you just update your XML schema?

I don't think JAXB can handle unknow xml elements since it does not have any JAXB defined POJO class to map it to.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JAXB if new tag is added to XML