I have an addon question to my original post. In the following XML, I know the tag names for Info, Element1, and Element2. I don't know the names of the USERSPECIFIEDTAGs.
<Info> <USERSPECIFIEDTAG1> <Element1/> <Element2/> </USERSPECIFIEDTAG1> <USERSPECIFIEDTAG2> <Element1/> <Element2/> </USERSPECIFIEDTAG2> </Info> Is there any way I could use xsd:any for the USERSPECIFIEDTAGs and get to the underlying elements in the classes Castor creates? (When I use xsd:any, it creates a vector with the tag names and values - I'm not sure how to construct the xsd when the USERSPECIFIED TAG is actually a group.) Koku wrote: > > This certainly does! Thank you for taking the time to respond > > > > Werner Guttmann wrote: >> >> If you started with an XML schema, and used the XML code generator to >> generate the Java classes from the schema, you would define the content >> of the <FormData> element to be of type <xs:any/>. >> >> As such, Castor would handle this through an AnyNode instance, which is >> actually a DOM-like representation of the XML unmarshalled. >> >> Does this meet your needs ? >> >> Regards >> Werner >> >> Koku wrote: >>> In the xml I receive there is 'control' data with known tags. There is >>> also >>> data that I don't care about, but need to pass along to a helper class. >>> Is >>> there a way to unmarshall and marshall in such a way that I don't have >>> to >>> have all the classes for all possible tags generated? For example: >>> >>> <FormInfo> >>> <CommonInfo> >>> <sessionId>12345</sessionId> >>> <\CommonInfo> >>> <FormData> >>> ... >>> <\FormData> >>> <\FormInfo> >>> >>> In this simplified example, the tags in the FormData section could vary >>> greatly. My processing does not access the data in that section, but >>> needs >>> to pass it to the next class. Is there a way to marshall and unmarshall >>> this xml and not lose those tags (and associated data)? >>> >>> Any ideas would be appreciated. Thank you! >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > -- View this message in context: http://www.nabble.com/Marshalling-and-Unmarshalling-tp17406736p18137872.html Sent from the Castor - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

