I don't believe there is a better way to do that than with your own marshaller since you're not directly mapping a value in the xml to your java. I think the custom marshaller is the way to go, it seems like you want to extend what JiBX can do.
Mocky -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Chen Sent: Saturday, April 16, 2005 3:28 AM To: jibx-users@lists.sourceforge.net Subject: [jibx-users] Binding File question 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 jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------- 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 jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users