TEXT Node Value

Anyone know what is the return value of a text node from TaminoResult.getElement() or DOM result if it is empty?

I am able to detect some “\n” but some TEXT Nodes that has a null values are unable to be detected.

I tried to cdo this
if ( textNode.getNodeValue().equals("\t")||
textNode.getNodeValue().equals(" “)||

”\n" - some can be detected
others no.

any reason?? cos i need to traverse the tree and ignore TEXT nodes that are empty.


cheers !

Maybe your text node does not contain one “\t” or one " “, maybe it contains both. So you should try to do conventional whitespace stripping, which means to remove all " “, “\t”, “\n”, “\r” characters. The String.trim() method should do that for you:

if ( textNode.getNodeValue().trim().equals(””) ) {


hi Chaudhuri

Danke! will try it out tomorrow.


cheers !