I have solved my problem.
Here is the code.
while (tr.hasMoreElements())
{
Element myElement = tr.getNextElement();
NodeList myNodeList = myElement.getElementsByTagName(“LATEST”);
Node myNode = myNodeList.item(0);
Node newNode = myNodeList.item(0);
Node myParent = myNode.getParentNode();
BasicDocument doc = new BasicDocument();
BasicElement newsStory = new BasicElement(doc,“LATEST”);
newsStory.setAttribute(“DISPLAY”, display);
BasicElement c = new BasicElement(doc,“TITLE”);
c.appendChild(new BasicText(doc,title));
newsStory.appendChild(c);
c = new BasicElement(doc,“BODY”);
c.appendChild(new BasicText(doc,body));
newsStory.appendChild(c);
myParent.appendChild( newsStory );
TaminoResult lasttr = tamino.update(myElement);
tamino.commit(false);
}
tamino.endSession();
#webMethods-Tamino-XML-Server-APIs#webMethods#API-Management