Hi Cezar,

I've tried these methods but they are not fully sufficient; they move the xml correcly in the underlying DOM tree but the XmlObject bound to the moved element is invalidated; I get a org.apache.xmlbeans.impl.values.XmlValueDisconnectedException when trying to use it after its underlying xml has been moved..  this is exactly what I want to avoid; I have bound a java-object to the XmlObject and dont want to need to "rebind" to new XmlObjects when rearranging the list.. is it possible some other way perhaps?

thanks for your help!

/Ole
eviware.com

>-----Original Message-----
>From: Cezar Andrei [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, June 20, 2006 06:57 AM
>To: user@xmlbeans.apache.org
>Subject: RE: Feature request: Array Reordering
>
>This is already possible using the XmlCursor API. Check out XmlCursor's
>moveXml() and moveXmlContents() methods.
>
>Cezar
>
>> -----Original Message-----
>> From: Ole Matzura [mailto:[EMAIL PROTECTED]
>> Sent: Monday, June 19, 2006 5:53 PM
>> To: user@xmlbeans.apache.org
>> Subject: Feature request: Array Reordering
>>
>> Hi all!
>>
>> this may be a little late for the upcoming release, but it would be
>> great if a future release had support for reordering the contents of
>> List (as generated for a sequence) without requiring to recreate
>> affected element(s); today if I want to reorder the contents of a List
>I
>> need to create copies of the existing XmlObjects instead of just being
>> able to "move" them, for example:
>>
>> FooType[] array = t.getFooArray(); // array.length == 4
>>
>> FooType f = (FooType) array[3].copy(); // you need to do a copy here,
>> otherwise the next statement will obliterate array[3]
>>
>> t.setFooArray(3, array[1]);
>>
>> t.setFooArray(1, f);
>>
>> should be replaced by something like
>>
>> t.moveFooArrayItem( int sourceIndex, int targetIndex );
>>
>> ie
>>
>> t.moveFooArrayItem( 3, 1 );
>>
>> understandable? Maybe this is already possible in some other way?
>>
>> best regards!
>>
>> /Ole
>> eviware.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>_______________________________________________________________________
>Notice: This email message, together with any attachments, may contain
>information of BEA Systems, Inc., its subsidiaries and affiliated
>entities, that may be confidential, proprietary, copyrighted and/or
>legally privileged, and is intended solely for the use of the individual
>or entity named in this message. If you are not the intended recipient,
>and have received this message in error, please immediately return this
>by email and then delete it.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to