It's not a secret anymore!*
The moose likes XML and Related Technologies and the fly likes Castor unmarshalling problem when ignoring elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Castor unmarshalling problem when ignoring elements" Watch "Castor unmarshalling problem when ignoring elements" New topic
Author

Castor unmarshalling problem when ignoring elements

Sree Potluri
Ranch Hand

Joined: Aug 12, 2009
Posts: 62
Hi,

I have 2 XML files that have some attributes that are same.

First xml


second xml


When I am parsing the second xml, then I am getting error as org.exolab.castor.xml.MarshalException:Illegal text data found as child of:name

Java class



Can you please help me why the elements are not ignored?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Castor unmarshalling problem when ignoring elements