Node child;
StringBuffer text = new StringBuffer();
// Find the Text nodes contained within this element and return their
// concatenated value. Required to go around comments, entities, etc.
child = getFirstChild();
while ( child != null )
{
if ( child instanceof Text ) {
text.append(( (Text) child ).getData());
}
child = child.getNextSibling();
}
return text.toString();