Android Utililty Methods XPath Evaluate

List of utility methods to do XPath Evaluate

Description

The list of methods to do XPath Evaluate are organized into topic(s).

Method

StringasString(String expression, Node node)
Evaluates the specified XPath expression and returns the result as a string.
return evaluateAsString(expression, node);
NodeasNode(String nodeName, Node node)
as Node
if (node == null)
    return null;
return findXPathNode(node, nodeName);
NodeListasNodeList(String nodeName, Node node)
as Node List
if (node == null)
    return null;
return findXPathNodeList(node, nodeName);
LongasLong(String expression, Node node)
Evaluates the specified XPath expression and returns the result as a Long.
String longString = evaluateAsString(expression, node);
return (isEmptyString(longString)) ? null : Long
        .valueOf(longString);
IntegerasInteger(String expression, Node node)
Evaluates the specified XPath expression and returns the result as an Integer.
String intString = evaluateAsString(expression, node);
return (isEmptyString(intString)) ? null : Integer
        .valueOf(intString);
FloatasFloat(String expression, Node node)
Evaluates the specified XPath expression and returns the result as a Float.
String floatString = evaluateAsString(expression, node);
return (isEmptyString(floatString)) ? null : Float
        .valueOf(floatString);
DoubleasDouble(String expression, Node node)
Evaluates the specified XPath expression and returns the results as a Double.
String doubleString = evaluateAsString(expression, node);
return (isEmptyString(doubleString)) ? null : Double
        .valueOf(doubleString);
DateasDate(String expression, Node node)
Evaluates the specified XPath expression and returns the result as a Date.
String dateString = evaluateAsString(expression, node);
if (isEmptyString(dateString))
    return null;
try {
    return dateUtils.parseIso8601Date(dateString);
} catch (ParseException e) {
    log.error(
            "Unable to parse date '" + dateString + "':  "
...
ByteasByte(String expression, Node node)
Evaluates the specified XPath expression and returns the result as a Byte.
String byteString = evaluateAsString(expression, node);
return (isEmptyString(byteString)) ? null : Byte
        .valueOf(byteString);
ByteBufferasByteBuffer(String expression, Node node)
Evaluates the specified xpath expression, base64 decodes the data and returns the result as a ByteBuffer.
String base64EncodedString = evaluateAsString(expression, node);
if (isEmptyString(base64EncodedString))
    return null;
if (!isEmpty(node)) {
    try {
        byte[] base64EncodedBytes = base64EncodedString
                .getBytes("UTF-8");
        byte[] decodedBytes = Base64
...