Updating a Node in Tamino

Hi,

I want to update the node .

I am trying the following code, but it is not updating, please let me know where I am missing ?

import java.util.;
import org.w3c.dom.
;
import com.softwareag.tamino.API.dom.ui.DomTreeView;
import com.softwareag.tamino.API.dom.;
import com.docuverse.dom.
;

public class TaminoNodeUpdate
{
public static final void main(String arg) throws Exception
{
TaminoClient tamino = new TaminoClient(“http://localhost/tamino/TEST”);
tamino.startSession();
try{
String tq=“”;
tq = “Telephone[LoginName=‘TestLoginName2’]”;
System.out.println("tq : " + tq);
TaminoResult tr = tamino.query(tq);
BasicDocument doc=new BasicDocument();
BasicElement telephone = new BasicElement(doc,“Telephone”);

BasicElement c = new BasicElement(doc,“Lastname”);
c.appendChild(new BasicText(doc,“Changed LastName”));
telephone.appendChild(c);

while(tr.hasMoreElements())
{
Element el = tr.getNextElement();
tamino.update(telephone);
}

tamino.endSession();
}
catch(Exception er)
{
System.out.println("Error in Tamino " + er);
}
}
}

Thanks
N.V.Sairam.

Are you trying to do something like this:

import java.util.;
import org.w3c.dom.
;
import com.softwareag.tamino.API.dom.;
import com.docuverse.dom.
;

public class TaminoNodeUpdate
{
public static final void main(String arg) throws Exception
{
TaminoClient tamino = new TaminoClient(“http://localhost/tamino/TEST”);
tamino.startSession();
try{
String tq = “Telephone[LoginName=‘TestLoginName2’]”;
TaminoResult tr = tamino.query(tq);
Document doc = tr.getDocument();
Element telephone = (Element)tr.getElement().getFirstChild();
Element lastName = (Element)telephone.getElementsByTagName(“Lastname”).item(0);
lastName.getChildNodes().item(0).setNodeValue(“Changed LastName”);
tamino.update(telephone);
tamino.endSession();
}
catch(Exception er)
{
System.out.println("Error in Tamino " + er);
}
}
}

Thanks for the help. Manal.