Code example for XPathExpression

Methods: evaluate

0
  } 
 
  @Override 
  public String getPackage() {
    try { 
      return (String) packageExpression.evaluate(doc, XPathConstants.STRING);
    } catch (XPathExpressionException e) {
      throw Throwables.propagate(e);
    } 
  } 
 
  /** 
   * This allows querying the AndroidManifest for e.g. attributes like android:name using XPath 
   */ 
  private static NamespaceContext androidNamespaceContext = new NamespaceContext() {
    @Override 
    public Iterator<String> getPrefixes(String namespaceURI) { 
      throw new UnsupportedOperationException(); 
    } 
 
    @Override