TaminoResult.getDocument() problem/question

I’m using the TaminoClient from the Tamino XML Database for Windows.

JAXP 1.1 does not want to read in the tree from the getDocument().

I’ve attached a code example from the JAXP 1.1 examples, and inserted below a snippet of how I expected to plug in the TaminoResult.

I’ve replaced this section:

// Step 3: parse the input file
Document doc = null;
try {
doc = db.parse(new File(filename));
} catch (SAXException se) {
} catch (IOException ioe) {

with this:


DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

DocumentBuilder db = null;
Document doc = null;
TaminoResult tr = null;
db = dbf.newDocumentBuilder();
doc = db.newDocument();

TaminoClient tamino = new TaminoClient( TAMINO_URL );
tr = tamino.query( “CATEGORY” );
doc = tr.getDocument();
catch( … )


I get an Exception when trying to manipulate the doc with the DOMEcho.java example attached (code replaced as described.

Anybody have any experience and luck with the getDocument() or getElement() methods from the TaminoResult?

Perhaps I am just doing something wrong. I did convert send the toXmlString to an InputStream and parsed that successfully with the same code. Example of this:


StringBufferInputStream is = new StringBufferInputStream( tr.toXmlString() );
doc = db.parse( is );

Not clean, but it got my job done. I could use the JAXP and walk down the tree with no problems after this. But I see it as a String -> TaminoResult -> String -> Document.

Hopefully this community can help.

DOMEcho.java (12.4 KB)

Maybe your doc is not org.w3c.dom.Document I’ve had this problem few weeks ago here is some cutted src from my old tests - as far as i remember .getDocument() was working fine.

public TaminoResult resultFromTamino (String host, String query)
TaminoResult tr=null;
try {
TaminoClient tamino = new TaminoClient(host);
tr = tamino.query(query);
return tr;


org.w3c.dom.Document dataInDocument=(org.w3c.dom.Document) tamino.resultFromTamino(“http://localhost/tamino/Test/Sailing/yacht","yacht”).getDocument();


I think your problem is a result of Tamino returning a DOM1 document, and JAXP expecting a DOM2 document. When the DOMEcho class processes the returned DOM1 document and attempts to execute the root node’s “getNamespaceURI()” method, this fails at run time.

I have attached a modified version of DOMEcho that works, because I have removed all DOM2-specific operations. The classpath I used to compile and execute this was:


Hope this helps.
DOMEcho.zip (4.09 KB)