From the JavaDoc: returns: The String that is the result of evaluating the expression and converting the result to a String.
/**
* ...
* ...
* @return The <code>String</code> that is the result of evaluating the expression and converting the result to a
* <code>String</code>.
* ...
* ...
*/
String javax.xml.xpath.XPathExpression.evaluate(Object item)
The question is, it is a bit vauge what is the contract here in case the expression finds nothing. Is null an valid / invalid return in all implementations? where is the return API defined? in the JSR?