paul brockmeyer wrote:
>
> i'm marshalling a Java object into xml ...
> one of the class attributes is of type boolean (not Boolean).
> i can marshall this via introspection with no problem,
> but i want to add an entry to my mapping.xml (to change xml tag
> for the field or make it an element instead of the default attribute).
> boolean in mapping.xml (as i have below) expects java.lang.Boolean ...
>
> <field name="isValid" type="boolean">
> <bind-xml name="isValid" node="element"/>
> </field>
>
> any ideas on this?
hmmmm...it should work using "boolean" ...not sure why it wouldn't. I'll
have to take a look into that...
>
> also, when relying on introspection, all attributes from the Java
> class become attributes in the xml (as opposed to elements). is there a way
> to change
> the default to create elements?
See castor.properties file:
# Defines the NodeType for use with Java primitive types (int, long,
# boolean, etc). This value is only used by the Introspector.
# valid values are either "attribute" or "element". By default
# all primitives are marshalled as attributes. Simply uncomment
# the following line to change the NodeType to element.
#
#org.exolab.castor.xml.introspector.primitive.nodetype=element
--Keith
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev