question: public static Element selectElement ( XPathExpression expr , Node context ) { try { Object result = expr . evaluate ( context , XPathConstants . NODE ) ; if ( result == null ) { return null ; } else if ( result instanceof Element ) { return ( Element ) result ; } else { throw new XmlException ( "Not an element: " + result ) ; } } catch ( XPathExpressionException e ) { throw new XmlException ( e ) ; } }
target:  Evaluates the XPath expression to a single element.