[bdbxml] Document modifications are not applied
"Stephan Korthoff" <[email protected]>
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I've got a problem with the modification of documents. I took the
modification example from sleepycat.com and
implemented an attribute value change as follows:
....
try
{
XmlModify BerkModifier = BerkManager.createModify();
XmlQueryContext context = BerkManager.createQueryContext();
XmlQueryExpression BerkQExp =
BerkManager.prepare("collection('xmachberk.dbxml')/kenndaten[@doc_id=d" +
String.valueOf(intDocId) +
"]/felder_als_attribute/@double_feld_r", context);
System.out.println("DEBUG Anfrage:
collection('xmachberk.dbxml')/kenndaten[@doc_id=d" +
String.valueOf(intDocId) +
"]/felder_als_attribute/@double_feld_r");
BerkModifier.addUpdateStep(BerkQExp, newAttributeValue );
System.out.println("DEBUG retdoc: " + retDoc.getContentAsString());
XmlDocument retDoc = BerkContainer.getDocument(docId);
XmlValue docValue = new XmlValue(retDoc);
System.out.println("DEBUG docValue asString: " + docValue.asString());
BerkModifier.execute( docValue, context, BerkUpdContext);
XmlDocument retDoc2 = BerkContainer.getDocument(docId); // +
String.valueOf(intDocId));
System.out.println("DEBUG docValue ret2: " +
retDoc2.getContentAsString());
}
...
The problem is that the document will not be modified. The line
System.out.println("DEBUG retdoc: " + retDoc.getContentAsString());
gives me the same output as
System.out.println("DEBUG docValue ret2: " + retDoc2.getContentAsString());.
And a manual check with the console utility gives me of course the same
result.
Any help is highly appreciated.
Best regards,
Stephan Korthoff
--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
------------------------------------------
To remove yourself from this list, send an
email to [email protected]