content-parser/impl-xml/src/main/java/net/sf/mmm/content/parser/impl/xml/ContentParserXml.java
/**
   * This method parses the content of the given <code>bufferedReader</code> and
   * appends the textual content to the <code>textBuffer</code>. Additional
   * metadata can directly be set in the given <code>properties</code>.
   * 
   * @param bufferedReader is where to read the content from.
   * @param options are the {@link ContentParserOptions}.
   * @param context is where the metadata is collected.
   * @param textBuffer is the buffer where the textual content should be
   *        appended to.
   * @throws Exception if something goes wrong.
   */
This method parses the content of the given bufferedReader and
appends the textual content to the textBuffer. Additional
metadata can directly be set in the given properties.

@param bufferedReader is where to read the content from.
@param options are the  ContentParserOptions.
@param context is where the metadata is collected.
@param textBuffer is the buffer where the textual content should be
appended to.
@throws Exception if something goes wrong.
This method parses the content of the given bufferedReader and appends the textual content to the textBuffer . Additional metadata can directly be set in the given properties . @param bufferedReader is where to read the content from . @param options are the ContentParserOptions . @param context is where the metadata is collected . @param textBuffer is the buffer where the textual content should be appended to . @throws Exception if something goes wrong .
public void parse(BufferedReader bufferedReader, ContentParserOptions options,
      MutableGenericContext context, StringBuilder textBuffer) throws Exception {
    long maxChars = options.getMaximumBufferSize() / 2;
    ParserState parserState = null;
    String line = bufferedReader.readLine();
    while (line != null) {
      int len = textBuffer.length();
      line = line.trim();
      parserState = this.xmlUtil.extractPlainText(line, textBuffer, parserState);
      if (textBuffer.length() > maxChars) {
        break;
      }
      if (textBuffer.length() > len) {
        textBuffer.append('\n');
      }
      line = bufferedReader.readLine();
    }
  }
public void parse ( BufferedReader bufferedReader , ContentParserOptions options , MutableGenericContext context , StringBuilder textBuffer ) throws Exception { long maxChars = options . getMaximumBufferSize ( ) / 2 ; ParserState parserState = null ; String line = bufferedReader . readLine ( ) ; while ( line != null ) { int len = textBuffer . length ( ) ; line = line . trim ( ) ; parserState = this . xmlUtil . extractPlainText ( line , textBuffer , parserState ) ; if ( textBuffer . length ( ) > maxChars ) { break ; } if ( textBuffer . length ( ) > len ) { textBuffer . append ( '\n' ) ; } line = bufferedReader . readLine ( ) ; } }
This method parses the content of the given <code>bufferedReader</code> and
 appends the textual content to the <code>textBuffer</code>.
This method parses the content of the given <code > bufferedReader< / code > and appends the textual content to the <code > textBuffer< / code > .