Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

move node to another part of the document

crismaheApr 28 2011 — edited Apr 28 2011
Hi,

I have a problem moving nodes from one part of the document to another.
This is the xquery I execute after checking that all the nodes requests exists.
let $area :=doc("dbxml:/doPlanning.dbxml/doPlanning.xml")/client/rootArea//area[@idArea="5"]
let $areaPadre :=doc("dbxml:/doPlanning.dbxml/doPlanning.xml")/client/rootArea//area[@idArea="9"]
return ( insert node $area as last into $areaPadre, delete node $area) 
With this xquery I want to delete node <area @idArea="5"/> from its original position and insert it as a child of <area @idArea="9"/>

It sometimes do it right, but sometimes it duplicates the node, but it isn't remove from its original position.

I used Berkeley DB XML in Solaris. I can give more information if it's necessary.

Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2011
Added on Apr 28 2011
5 comments
651 views