Hi Werner,
Is the "content" node type a new addition?
When I try to use this mapping I get the following exception:
org.exolab.castor.xml.MarshalException:
java.lang.IllegalArgumentException: 'content' is not a valid
BindXmlNodeType
Thanks,
Dan.
Quoting Werner Guttmann <[EMAIL PROTECTED]>:
Sure, there is. Try the following mapping:
<class name="com.Service">
<map-to xml="service"/>
<field name="id"><bind-xml node="content"/></field>
<field name="mode"><bind-xml node="attribute"/></field>
</class>
That should produce XML as follows:
<service mode="R">D2STD</service>
Regards
Werner
[EMAIL PROTECTED] wrote:
Hi All,
I have a class called Service with two attributes, mode and id.
Currently I am using Castor to unmarshal this xml:
<service mode="R" id="D2MAX"/>
The fields are mapped like this:
<class name="com.Service">
<map-to xml="service"/>
<field name="id"><bind-xml node="attribute"/></field>
<field name="mode"><bind-xml node="attribute"/></field>
</class>
Is there any way to map the class so that the id attribute is mapped
like this:
<service mode="R">D2STD</service>
Rather than like this:
<service mode="R"><id>D2STD</id></service>
Much appreciated,
Dan.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email