getElement doesn't !

I am trying to query Tamino using the new API and return DOM2 Elements which I can process. The code extract below:

code:

TConnection myConnection = TConnectionFactory.getInstance().newConnection( taminoURL );
TLocalTransaction localTransaction = myConnection.useLocalTransactionMode();
TXMLObjectAccessor xmlObjectAccessor =
myConnection.newXMLObjectAccessor( TAccessLocation.newInstance( taminoCollection ), TDOMObjectModel.getInstance() );
TQuery query = TQuery.newInstance( taminoDocType + “[@ino:id=1]”);
TResponse response = xmlObjectAccessor.query( query );
if ( response.hasFirstXMLObject() ) {
TXMLObjectIterator myIterator = response.getXMLObjectIterator();
while (myIterator.hasNext()) {
TXMLObject xmlObjectReturned = myIterator.next();
xmlObjectReturned.writeTo(System.out);
Element myElement = (Element)
xmlObjectReturned.getElement();
System.out.println("Element for transform is: " + myElement);


…results in output on System.out:


3456

Element for transform is: [Property: null]

So the writeTo works fine, but the Element is not what I expected (I expected xml).

What am I doing wrong?

It was working - it just didn’t look like it.
My mistake.