either write the xsd that way or if your xsd is like mine and comes from another source, write a stylesheet so that it inserts the sub-element or attributes of the type. Castor will then generate a field to hold that info and unmarshall/marshall it. You might want to make the field final in the xsd so type can't be changed(I don't remember what the attribute was for that).
Dean

Lo�c Jay wrote:

I just started to use Castor to marshall and unmarshall object. I' ve got an
object of <mypackage.Person> class.

A person has a name of java.lang.String type.

Is there a way to marshall my object (a person which name is "Ryan") so that
result is :

<person xsi:type="mypackage.Person">
<name xsi:type="java:java.lang.String">
Ryan
</name>
</person>

In fact, I would like to have a type attribute on every result element of
the marshalling.

Thanks

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev


----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to