us.monoid.web
Class XPathQuery

java.lang.Object
  extended by us.monoid.web.PathQuery<XMLResource,NodeList>
      extended by us.monoid.web.XPathQuery

public class XPathQuery
extends PathQuery<XMLResource,NodeList>

PathQuery for XPath. Use this to access XMLResource objects. Many times you might want to use Resty.xpath(...) to create instances of this class.

Author:
beders

Constructor Summary
XPathQuery(String anXPath)
           
 
Method Summary
<T> T
eval(XMLResource resource, Class<T> aReturnType)
          Evaluate the XPath on an XMLResource and convert the result into aReturnType.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathQuery

public XPathQuery(String anXPath)
           throws XPathException
Throws:
XPathException
Method Detail

eval

public <T> T eval(XMLResource resource,
                  Class<T> aReturnType)
       throws Exception
Evaluate the XPath on an XMLResource and convert the result into aReturnType.

Type Parameters:
T - the expected type of the result
Parameters:
resource -
aReturnType -
Returns:
Throws:
Exception


Copyright © 2013. All Rights Reserved.