Hi,
I'm having trouble doing the following ox-mapping:
From xml:
<MyObject>
<BooleanValue />
</MyObject>
To this domain object:
class MyObject {
private boolean booleanValue;
}
The rules for the mapping is that if the element <BooleanValue /> exist in xml the value of the corresponding field should be set to true, else the value of field booleanValue should be set to false. The reverse logic is also true: booleanValue=true should produce the element and booleanValue=false should omit outputting the element.
I have no clue how to create descriptors for this kind of mapping. Any help is appreciated.
Thanks for the example, it helped a lot. I have now managed to create a working descriptor for mapping my example object. There is just one annoying thing left though. When marshaling from java to xml i get the following output: