Hi,

I am wondering if anyone can tell me if it's possible to map the following XML to a class:

The XML is something like this:

<features>
  <feature1>
     <required/>
  </feature1>
</features>

The class is something like this:

class Features {
  boolean feature1Supported;
  boolean feature1Required;

  //additional set/get methods
}

Is it possible with JiBX to define the binding file such that I can set a boolean value when a certain element exists (ie. <required/> in this case)? If so, how do I go about handling subelements and mapping them to the Features class as shown above? I've been pondering this for a while. The only way I can currently deal with this is through custom marshallers and unmarshallers.

I am wondering if there is a  better way other than writing custom code.

Thank you for your time,
Chris



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to