My Oracle Support Banner

XmlModify Occasionally Works Incorrectly on Documents Stored Inside NodeStorage Containers (Doc ID 436037.1)

Last updated on JANUARY 08, 2020

Applies to:

Berkeley DB XML - Version 2.3.10 and later
Information in this document applies to any platform.
NOTE: In the images and/or the document content below, the user information, the object name information, the database name information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

Symptoms

XmlModify performs correctly on documents stored inside WholeDoc containers, but in some situations doesn’t work correctly for documents stored inside NodeStorage containers. This issue is seen with DBXML 2.3.10.
These particular situations refer to cases when the document contains elements with ending tag inside, i.e. <add/>.

Here is an example document: 

 <xml><insert><add/></insert><error/></xml>

 An example of modifications performed on this document (in C++):

- add the <add> element after the <insert> element

string query = "/xml/insert";
XmlQueryExpression queryExpression = man.prepare(query, queryContext);
modify.addAppendStep(queryExpression, XmlModify::Element, "add", "");

- add the “att” attribute with the “val” value after the last <add> element

query = "/xml/insert/add[last()]";
queryExpression = man.prepare(query, queryContext);
modify.addAppendStep(queryExpression, XmlModify::Attribute, "att", "val");

The resulting document should be:

<xml><insert><add/><add att="val"/></insert><error/></xml> 


This resulting document is observed for WholeDoc containers, but for NodeStorage containers the resulting document is:

<xml><insert><add att="val"/></insert><add/></xml>

 which is incorrect.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.