This should be obvious but it isn't to me. I have generated classes from XML
schema with XMLBeans.
The names of the objects are irrevelant.
I do the following:
businessDescription.addNewBS7666Coordinate().setX(12345);
businessDescription.getBS7666Coordinate().setY(54321);
I want to remove the BS7666Coordinate object, how can I do this? I've tried:
businessDescription.getBS7666Coordinate().setNil()
businessDescription.setBS7666Coordinate(null)
Niether work? If I output the XML I get:
<rol:BS7666Coordinate xsi:nil="true"/>
Since I cannot see how to remove it I want to modify the object that I have
added above and nullified by calling setNil:
businessDescription.getBS7666Coordinate().setX(1111);
businessDescription.getBS7666Coordinate().setY(2222);
This gives:
<rol:BS7666Coordinate xsi:nil="true">
<bs7:X>1111</bs7:X>
<bs7:Y>2222</bs7:Y>
</rol:BS7666Coordinate>
The nil attribute is still set?? Why? I can't see how to unset it.
If I try instead the following and attempt to replace the object with a new
one:
businessDescription.addNewBS7666Coordinate().setX(1111);
businessDescription.getBS7666Coordinate().setY(2222);
I get:
<rol:BS7666Coordinate xsi:nil="true">
<bs7:Y>6868</bs7:Y>
</rol:BS7666Coordinate>
It appears the addNewBS7666Coordinate has failed yet passed back a valid
object since setX is called. Then getBS7666Coordinate is called which brings
back the orignal object and the Y value is set, hence the result.
I must be miss understanding something fundamental about XMLBeans?
I suppose my question is how to add an object and then remove it and then
add another?
Any ideas?
Thanks
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]