public String getContent ( ) { String content = "" ; NodeList list = dom . getChildNodes ( ) ; for ( int i = 0 ; i < list . getLength ( ) ; i ++ ) { if ( list . item ( i ) instanceof Text ) { content += ( list . item ( i ) . getNodeValue ( ) ) ; } } return content ; }
Get the text content of the element i . e . the bit between the tags