private String getElementText ( Element element ) { Node node = element . getFirstChild ( ) ; if ( node == null || node . getNodeType ( ) != Node . TEXT_NODE ) { return null ; } return node . getNodeValue ( ) . trim ( ) ; }
Read begin tag text end tag .