private TextImpl nextTextNode(){
  Node nextSibling=getNextSibling();
  if (nextSibling == null) {
    return null;
  }
  short nodeType=nextSibling.getNodeType();
  return nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE ? (TextImpl)nextSibling : null;
}

private TextImpl nextTextNode ( ) { Node nextSibling = getNextSibling ( ) ; if ( nextSibling == null ) { return null ; } short nodeType = nextSibling . getNodeType ( ) ; return nodeType == Node . TEXT_NODE || nodeType == Node . CDATA_SECTION_NODE ? ( TextImpl ) nextSibling : null ; }
returns the next sibling node if it exists and it is text or cdata . otherwise returns null .
