Hi Heri,
If you really don't care about the format, you can map all unknown tags to a Castor AnyNode type and it will preserve all the XML so that you can re-marshal it later or access it via the org.exolab.castor.types.AnyNode.
The mapping would look something like:
<field name="extraElements" type="org.exolab.castor.types.AnyNode"
collection="arraylist"/>
<bind-xml matches="*"/>
</field>--Keith
Bender Heri wrote:
hi all
need some advice how to solve following problem.
We work on a system where different partners are involved. There is a common standard of xml-messages with well defined tags. But each partner has also its own proprietary enhancements (additional tags not known by the standard). Our server must receive such messages, analyze the well known tags and do some work on it (i.e. saving to a database). Later we must transmit the same data to annother host, including the received unknown tags.
Because we are not interested in the content of this unknown tags, I thought to save them as plain xml-strings in order to insert them later when marshalling the new message. (This approach saves me to change the schema and code and DB each time a proprietary enhancement changes.)
How is the best approach to achieve this, while
- unmarshalling, in order to receive all unknown tags as plain xml-strings - marshalling, in order to insert plain xml-string into a certain tag
any ideas?
TIA
Heri Bender
------------------------------------------------------------------------
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
