Beispiel #1
0
 private void flushBuffer() throws IOException {
   for (Text t : buffer) {
     if (t instanceof Comment) {
       listener.onComment(t.getText());
     } else if (t instanceof Whitespace) {
       listener.onWhitespace(t.getText());
     }
   }
   buffer.clear();
 }
Beispiel #2
0
 /**
  * This will append the content of another <code>Text</code> node to this node.
  *
  * @param text Text node to append.
  */
 public void append(Text text) {
   if (text == null) {
     return;
   }
   value += text.getText();
 }