public static String selectText(XPathExpression expr,Node context){
  try {
    return (String)expr.evaluate(context,XPathConstants.STRING);
  }
 catch (  XPathExpressionException e) {
    throw new XmlException(e);
  }
}

public static String selectText ( XPathExpression expr , Node context ) { try { return ( String ) expr . evaluate ( context , XPathConstants . STRING ) ; } catch ( XPathExpressionException e ) { throw new XmlException ( e ) ; } }
evaluates the xpath expression as text .
