I would like to put the result documents of my query in one document with root element “Trefferliste.”
The line
root = (Element)obj.getDocument();
is not working. How can I integrate the documents?
TResponse tresp=sendQuery(query, tacc);
Document doc = new Document();
Element root=new Element("TrefferListe");
TXMLObjectIterator ti = tresp.getXMLObjectIterator() ;
TXMLObject obj;
while(ti.hasNext())
{
obj = ti.next();
root = (Element)obj.getDocument();
}
doc.setRootElement(root);
[/code]