Paul Springer wrote:
> 
> My XML Schema defines ElementA and Element B.  ElementA can contain multiple
> instances of ElementB.  When SourceGenerator produces a Descriptor for ElementA,
> the setValue() routine only allows me to add a new ElementB.  I can't change any
> existing ElementB or even delete the existing ones by going through the
> Descriptor object.
> 

The descriptor was designed to be used by the Marshalling Framework, not
really intended for general interaction with the object model. To delete
elements from the object model, simply use the Object model itself and
not the descriptor.

> In the archive I read about the implementation of the resetValue method.  (Email
> was dated Oct 4, 2001, from Steve Vaughan, titled "SourceGenerator Bug Fixes for
> NMTOKENS and resetValue".)  That might work, but I have Castor 0.9.3.9, and
> can't find the source code mentioned in that email in the version I have.
> 
> Any ideas on how I can delete an existing ElementB from the list contained in
> ElementA?

Use ElementA to delete the object, not the descriptor, such as
ElementA#removeElementB(0);

or ElementA#removeAllElementB();

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to