code: public static String getNodeData(Node node)
    {
  
      FastStringBuffer buf = StringBufferPool.get();
      String s;
  
      try
      {
        getNodeData(node, buf);
  
        s = (buf.length() > 0) ? buf.toString() : "";
      }
      finally
      {
        StringBufferPool.free(buf);
      }
  
      return s;
    }
docs: Get the textual contents of the node. See
  getNodeData(Node,FastStringBuffer) for discussion of how
  whitespace nodes are handled.
  
  @param node DOM Node to be examined
  @return String containing a concatenation of all the
  textual content within that node.
  @see #getNodeData(Node,FastStringBuffer)