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!

XQuery multiple update/insert/delete

639445May 18 2008 — edited May 19 2008
Deleting/updating single nodes works fine with the API, but how would one do that in a batch process?

Example:

I want to insert nodes <x><y/><z/></x> into all Children of the Root of a document.

insert nodes <x><y/><z/></x> into doc('dbxml:/myDB/myContainer')/Root/Child

Gives out the following error:
Error: Sequence does not match type node() - the sequence contains more than one item [err:XUTY0005], <query>:13:1, errcode = QUERY_EVALUATION_ERROR

However, the following also doesn't work:

for $i in doc('dbxml:/myDB/myContainer')/Root/Child
insert nodes <x><y/><z/></x> into $i
(return something or no return)

Error: syntax error, unexpected insert, expecting return [err:XPST0003], <query>:14:7, errcode = QUERY_PARSER_ERROR


Is there a solution or workaround for my issue?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2008
Added on May 18 2008
2 comments
2,248 views