Hi, George.
 
According to your class 'units' is an attribute of Circle, but in xml it
is used like attribute of radius tag.
If you want to use following xml it would be better to add class Radius
containing field 'units'.
 
This way your binding looks like that:
 
<?xml version="1.0" encoding="UTF-8"?>
 <binding>

    <mapping name="circle" class="Circle">
        <structure map-as="Radius"/>
    </mapping>
 
    <mapping name="radius" class="Radius">>
       <value name="units" field="units" style="attribute" />
    </mapping>

</binding>
 
Hope it will help.
Elena Lukashevich 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Harp,
George
Sent: Tuesday, April 22, 2008 12:17 AM
To: jibx-users@lists.sourceforge.net
Subject: [jibx-users] Binding Question



What would the binding information for the following xml be? (I don't
quit understand how to bind attributes)

<circle>

   <radius units="inches">10</radius>

</circle>

 

Public class Circle

{

    private String units;

    private double radius;

} 

 

Thanks in advance

 

 

George Harp

Traffic.com Development

NAVTEQ - Chicago

(T)  +312-894-7225

[EMAIL PROTECTED]

www.navteq.com <http://www.navteq.com>  

 

________________________________

The information contained in this communication may be CONFIDENTIAL and
is intended only for the use of the recipient(s) named above. If you are
not the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication, or any of
its contents, is strictly prohibited. If you have received this
communication in error, please notify the sender and delete/destroy the
original message and any copy of it from your computer or paper files. 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to