question: private String readBuffer ( InputNode from ) throws Exception { int length = text . length ( ) ; if ( length > 0 ) { String value = text . toString ( ) ; text . setLength ( 0 ) ; return value ; } return null ; }
target:  This is used to read the text between element tags. If there is any text held in the buffer then this will return that text and clear the buffer. Clearing the buffer in this way means that the text can only ever be read once.