com.amazonaws.util

## クラス XpathUtils

- java.lang.Object
- - com.amazonaws.util.XpathUtils

-     public class XpathUtils
      extends java.lang.Object

  Utility methods for extracting data from XML documents using Xpath expressions.

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `XpathUtils()`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `static java.lang.Boolean` | `asBoolean(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a Boolean.
    `static java.lang.Byte` | `asByte(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a Byte.
    `static java.nio.ByteBuffer` | `asByteBuffer(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified xpath expression, base64 decodes the data and returns the result as a ByteBuffer.
    `static java.util.Date` | `asDate(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a Date.
    `static java.lang.Double` | `asDouble(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the results as a Double.
    `static java.lang.Float` | `asFloat(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a Float.
    `static java.lang.Integer` | `asInteger(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as an Integer.
    `static java.lang.Long` | `asLong(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a Long.
    `static org.w3c.dom.Node` | `asNode(java.lang.String nodeName, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a Node.
    `static java.lang.String` | `asString(java.lang.String expression, org.w3c.dom.Node node)` Evaluates the specified XPath expression and returns the result as a string.
    `static org.w3c.dom.Document` | `documentFrom(java.io.InputStream is)`
    `static org.w3c.dom.Document` | `documentFrom(java.lang.String xml)`
    `static org.w3c.dom.Document` | `documentFrom(java.net.URL url)`
    `static boolean` | `isEmpty(org.w3c.dom.Node node)` Returns true if the specified node is null or has no children.
    `static int` | `nodeLength(org.w3c.dom.NodeList list)` Returns the length of the specified node list.

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### XpathUtils

          public XpathUtils()

  - ### メソッドの詳細

    - #### documentFrom

          public static org.w3c.dom.Document documentFrom(java.io.InputStream is)
                                                   throws org.xml.sax.SAXException,
                                                          java.io.IOException,
                                                          javax.xml.parsers.ParserConfigurationException

      例外:
        `org.xml.sax.SAXException`
        `java.io.IOException`
        `javax.xml.parsers.ParserConfigurationException`

    - #### documentFrom

          public static org.w3c.dom.Document documentFrom(java.lang.String xml)
                                                   throws org.xml.sax.SAXException,
                                                          java.io.IOException,
                                                          javax.xml.parsers.ParserConfigurationException

      例外:
        `org.xml.sax.SAXException`
        `java.io.IOException`
        `javax.xml.parsers.ParserConfigurationException`

    - #### documentFrom

          public static org.w3c.dom.Document documentFrom(java.net.URL url)
                                                   throws org.xml.sax.SAXException,
                                                          java.io.IOException,
                                                          javax.xml.parsers.ParserConfigurationException

      例外:
        `org.xml.sax.SAXException`
        `java.io.IOException`
        `javax.xml.parsers.ParserConfigurationException`

    - #### asDouble

          public static java.lang.Double asDouble(java.lang.String expression,
                                  org.w3c.dom.Node node)
                                           throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the results as a Double.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Double result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asString

          public static java.lang.String asString(java.lang.String expression,
                                  org.w3c.dom.Node node)
                                           throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a string.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The string result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asInteger

          public static java.lang.Integer asInteger(java.lang.String expression,
                                    org.w3c.dom.Node node)
                                             throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as an Integer.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Integer result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asBoolean

          public static java.lang.Boolean asBoolean(java.lang.String expression,
                                    org.w3c.dom.Node node)
                                             throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a Boolean.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Boolean result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asFloat

          public static java.lang.Float asFloat(java.lang.String expression,
                                org.w3c.dom.Node node)
                                         throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a Float.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Float result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asLong

          public static java.lang.Long asLong(java.lang.String expression,
                              org.w3c.dom.Node node)
                                       throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a Long.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Long result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asByte

          public static java.lang.Byte asByte(java.lang.String expression,
                              org.w3c.dom.Node node)
                                       throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a Byte.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Byte result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asDate

          public static java.util.Date asDate(java.lang.String expression,
                              org.w3c.dom.Node node)
                                       throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a Date. Assumes that the node's text is formatted as an ISO 8601 date, as specified by xs:dateTime.
      パラメータ:
        `expression` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Date result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### asByteBuffer

          public static java.nio.ByteBuffer asByteBuffer(java.lang.String expression,
                                         org.w3c.dom.Node node)
                                                  throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified xpath expression, base64 decodes the data and returns the result as a ByteBuffer.
      パラメータ:
        `expression` - The Xpath expression to evaluate.
        `node` - The node on which to evaluate the expression.
      戻り値:
        A ByteBuffer of base64 decoded data from the result of evaluating the specified Xpath expression.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there are any problems evaluating the Xpath expression.

    - #### isEmpty

          public static boolean isEmpty(org.w3c.dom.Node node)

      Returns true if the specified node is null or has no children.
      パラメータ:
        `node` - The node to test.
      戻り値:
        True if the specified node is null or has no children.

    - #### asNode

          public static org.w3c.dom.Node asNode(java.lang.String nodeName,
                                org.w3c.dom.Node node)
                                         throws javax.xml.xpath.XPathExpressionException

      Evaluates the specified XPath expression and returns the result as a Node.
      パラメータ:
        `nodeName` - The XPath expression to evaluate.
        `node` - The node to run the expression on.
      戻り値:
        The Node result.
      例外:
        `javax.xml.xpath.XPathExpressionException` - If there was a problem processing the specified XPath expression.

    - #### nodeLength

          public static int nodeLength(org.w3c.dom.NodeList list)

      Returns the length of the specified node list.
      パラメータ:
        `list` - The node list to measure.
      戻り値:
        The length of the specified node list.