File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Greenhorn

Joined: Feb 23, 2010
Posts: 27
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
 
Similar Threads
Can I check whether a particular pattern of character is there in the attribute
Importing multiple external XSD files
Problem with JAXB if new tag is added to XML
XSD validation in XML
Spring web flow : Unable to locate Spring NamespaceHandler