posted 15 January 04 16:14
I am attemping to use AppendChild to add another iteration of an element instead of appending data to an existing element.
So if I have
In Java I want to Append another payment.
9876
ccccc>
pppp
bbbb
So conceptionally it will result in this:
9876
ccccc>
pppp
sssss
bbbb
This is my Java Code:
String data = rec1;
TLocalTransaction localTransaction = tcon.useLocalTransactionMode();
// In update
TXMLObject objAuthor = ti.next();
Element elemAuthor = (Element) objAuthor.getElement();
Document doc = elemAuthor.getOwnerDocument();
Element elemTitle = doc.createElement(fieldName);
Text textTitle = doc.createTextNode(data);
elemTitle.appendChild( textTitle);
elemAuthor.appendChild(elemTitle);
tacc.update(objAuthor);
// End of Update
System.out.println(" Update in completed");
localTransaction.commit();
When I run this I get :
Nested Exception ( com.softwareag.tamino.db.API.common.TAccessFailureException, tag: JavaTaminoAPI_4_1_4_42_1_1, java: 1.3.1, os: Windows XP 5.1 ) stacktrace:
Tamino access failure (INOXDE7731, (cvc-model-group.1):invalid sequence, Line 1, Column 1086: Line 1, Column 1086: [element “Paydtl_line” in element “Tax”])
at com.softwareag.tamino.db.API.accessor.TAccessFailureVerifier.newAccessFailureException(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TAccessFailureVerifier.verify(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TAccessFailureVerifier.verifyUpdateResponse(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TXMLObjectAccessorImpl.update(Unknown Source)
at com.softwareag.tamino.db.API.examples.greeting.AppendChild.main(AppendChild.java:161)
Exception in thread “main”
HELP…
Hello Roger,
the “… invalid sequence …” error is usually caused by an attempt to modify a document such that it no longer validates against the schema [defined in Tamino].
Could you please post the schema you are using, and the values of the various fields in your Java code?
Thanks,
Trevor.