commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Restamon <>
Subject [Betwixt] XML-to-Java transformation/mapping issue
Date Sun, 24 Feb 2008 05:09:59 GMT

I have a common structure for a "person" that I use in a number of different
places in my XML, which looks something like this in use:

<author id="XX" xlink:href="XX">XX</author>
<user id="XX" xlink:href="XX">XX</user>
<approver id="XX" xlink:href="XX" otherattr="XX">XX</approver>

I have a Java class called that has three properties (name, id,
and uri) and the following betwixt mapping:

<info primitiveTypes="element">
    <element property='name'>
        <attribute name='id' property='id'/>
        <attribute name='xlink:href' property='uri'/>

There is no "name" attribute at the highest level, because the "name" could
be author or user or approver, or potentially anything else that might be
needed in the future. This works fine when generating XML from Java;
however, when generating the Java objects from XML, the person data does not
get populated. More information can be found here: .

I'm no expert on Betwixt, so I may have gone about this completely wrong ...
I'd love to hear from someone who actually knows what they're doing who can
tell me what it is that I am doing wrong!

View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message