I would like to map the XML
<outter>
<a name="name1">
<b>
<c>
<e data="e data">
</e>
</c>
<d stuff="d Stuff">
</d>
</b>
</outter>to an object tree that looks like this:
Outter contains an A object (aObj) and a String (xmlStr). aObj maps to the 'a' element and xmlStr
contains the raw (not unmarshalled) xml string of the 'b' element and below
i.e. <b><c><e data="e data"></e></c><d stuff="d Stuff"></d></b>
Is this possible using Castor? If so, can someone suggest the appropriate mapping file?
I started down the road with something simialr to the following:
<class name="test.Outter">
<map-to xml="outter" />
<field name="aObj" type="test.A">
<bind-xml name="a" node="element" />
</field>
<field name="xmlStr" type="java.lang.String">
<bind-xml name="b" node="element" />
</field>
</class><class name="test.A">
<map-to cst:xml="a" />
<field cst:name="name" cst:type="java.lang.String">
<bind-xml name="name" node="attribute" />
</field>
</class>Thanks, Mark
_________________________________________________________________
Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
