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 .