DOM Document from TResponse

Does someone knows how to get a Document (org.w3c.dom) from a TResponse?

Need urgent help.

THX

Tobias

Hi,
You have posted in the TaminoClient API forum but as you have asked about TResponse I guess you’re really using TaminoAPI4J?

Anyway, you need two steps to get to a DOM Document:
1) Get a TXMLObject from your TResponse (either using getXMLObjectIterator() to get an iterator, and then using next/previous methods to return TXMLObjects; or just by using getFirstXMLObject)
2) call the TXMLObject’s getDocument() method. This returns an object of the type of your underlying Object Model. In your case you will need to cast it to a Document.

Hope this helps.

And another hint:
If your query to Tamino returns several documents, then TXMLObject.getElement() will give you the one document contained in this TXMLObject, whereas TXMObject.getDocument() will give you all documents returned by Tamino in one DOM tree.