private void linearize(Node n,StringBuffer buf){
  StringBuffer endText=processNode(n,buf);
  for (Node child=n.getFirstChild(); child != null; child=child.getNextSibling()) {
    linearize(child,buf);
  }
  if (endText != null) {
    buf.append(endText);
  }
}

private void linearize ( Node n , StringBuffer buf ) { StringBuffer endText = processNode ( n , buf ) ; for ( Node child = n . getFirstChild ( ) ; child != null ; child = child . getNextSibling ( ) ) { linearize ( child , buf ) ; } if ( endText != null ) { buf . append ( endText ) ; } }
appends the text for this node to the given stringbuffer .
