Examples of evaluateXPath()

@param xPathExpression @return @throws XPatherException

Examples of org.htmlcleaner.TagNode.evaluateXPath()

      }
    }
   
    i=0;
    int ok=0;
    for (Object o : node.evaluateXPath("//div[@class='encadre_fiche']"))
    {
      for(Object temp: ((TagNode)(o)).getAllChildren())
      {
        if(ok == 1)
        {
View Full Code Here

Examples of org.htmlcleaner.TagNode.evaluateXPath()

    boolean bool = false;

    String[] decoupage = mot.split(" ");
    if(decoupage.length == 1)
    {
      for (Object o : node.evaluateXPath("//table[@class='clFlatTable']//tr//td"))
      {
        if(((((TagNode)(o)).getText()).toString()).toLowerCase().equals(mot.toLowerCase()))
        {
          bool = true;
          int i = 0;
View Full Code Here

Examples of org.htmlcleaner.TagNode.evaluateXPath()

      }
    }
    else
    {
      test = false;
      for (Object o : node.evaluateXPath("//table[@class='clFlatTable']//tr//td"))
      {
        if(((((TagNode)(o)).getText()).toString()).toLowerCase().equals(decoupage[0].toLowerCase()))
        {
          int tag = -1;
          if(((((TagNode)(o)).getText()).toString()).toLowerCase().equals(decoupage[0].toLowerCase()))
View Full Code Here

Examples of org.htmlcleaner.TagNode.evaluateXPath()

        }
        System.out.println(System.currentTimeMillis()-time);

        time =System.currentTimeMillis();
        for (int i = 0; i < 2000; i++) {
            tagNode.evaluateXPath("//a");
        }
        System.out.println(System.currentTimeMillis()-time);

        System.out.println("=============");
View Full Code Here

Examples of org.htmlcleaner.TagNode.evaluateXPath()

        }
        System.out.println(System.currentTimeMillis()-time);

        time =System.currentTimeMillis();
        for (int i = 0; i < 2000; i++) {
            tagNode.evaluateXPath("//a");
        }
        System.out.println(System.currentTimeMillis()-time);

        System.out.println("=============");
View Full Code Here

Examples of org.htmlcleaner.TagNode.evaluateXPath()

        throw new RuntimeException("Failed to get page: " + statusCode);
      }
      String response = method.getResponseBodyAsString();
      HtmlCleaner html = new HtmlCleaner();
      TagNode content = html.clean(response).findElementByAttValue("id", "content", true, false);
      Object[] rows = content.evaluateXPath("table/tbody/tr[@id]");
      for (Object row: rows) {
        if (!(row instanceof TagNode)) {
          continue;
        }
        TagNode rowNode = (TagNode) row;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.