public static Long selectLong(XPathExpression expr,Node context){
  String value=selectText(expr,context);
  if (StringUtils.isNotBlank(value)) {
    try {
      return Long.parseLong(value);
    }
 catch (    NumberFormatException e) {
      return null;
    }
  }
 else {
    return null;
  }
}

public static Long selectLong ( XPathExpression expr , Node context ) { String value = selectText ( expr , context ) ; if ( StringUtils . isNotBlank ( value ) ) { try { return Long . parseLong ( value ) ; } catch ( NumberFormatException e ) { return null ; } } else { return null ; } }
evaluates the xpath expression as a long .
