code: public String evaluate(String select, Document document)
          throws ConfigurationException, XpathException {
          try {
              StringWriter writer = new StringWriter();
              StreamResult result = new StreamResult(writer);
              performTransform(getValueTransformation(select), document, result);
              return writer.toString();
          } catch (TransformerException ex) {
              throw new XpathException("Failed to apply stylesheet", ex);
          }
      }
docs: Evaluate the result of executing the specified xpath syntax
  <code>select</code> expression on the specified document
  @param select
  @param document
  @return evaluated result