who can tell me about the update() method?

I want to update an element,not a document.

for example:

kreven 28888888 david 55555555 smith 88888888

I will update [@ino:id=2]:

robort 33333333

How can use the update()?

this is tamino example:
public void performUpdate(TQuery query, String updatedText) throws
TException {
TLocalTransaction localTransaction = null;
// Perform query and update operations within a transaction
try {
// Switch to local transaction mode
localTransaction = connection.useLocalTransactionMode();
// Invoke the query to obtain the document and to lock it
TResponse response = accessor.query(query);
// Obtain the TXMLObject from the response
TXMLObject xmlObject = response.getFirstXMLObject();
if (xmlObject == null)
// Obtain the JDOM element and update its content
Element element = (Element) xmlObject.getElement();
// Invoke the update
response = accessor.update(xmlObject);
// System.out.println(“Update succeeded!”);
// Commit the transaction
// TQueryException and TUpdateException are both derived from TAccessorException
// so we simply use the base class here
catch (TAccessorException accessorException) {
throw accessorException;
finally {

It can only get first element and update the value.I will update the element which I need.
please help me.

There are examples in the documentation on iterating over elements. See http://servline24.softwareag.com/SecuredServices/document/java/ins421win/SDK/TaminoAPI4J/Documentation/inoapi/apiexcode.htm - look for the DOM4J entries - I think TDOM4JElementIterator.java will show you how to retrieve other elements.

You could also use an XQuery statement to update elements without updating the whole document.

Thank you very much.

An example in XQuery of the update query for your example:

declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
update for $user in input()/User
let $userid := tf:getInoId($user)
let $name := $user/Name
let $tel := $user/Tel
where $userid = 2
do ( replace $name with <Name>robort</Name>
     replace $tel with <Tel>33333333</Tel> 

If you just wanted to change the phone #, it would be:

declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
update for $user in input()/User
let $userid := tf:getInoId($user)
let $tel := $user/Tel
where $userid = 2
do replace $tel with <Tel>33333333</Tel>