Examples of Elements


Examples of org.jsoup.select.Elements

    connection.timeout(30*1000); //in miliseondes
   
    Document doc = connection.url(urlServer).get();
   
    //On récupère dans ce document la premiere balise ayant comme nom h1 et pour attribut class="title"
    Elements elements= doc.getElementsByClass("boxStats");
   
    //Voir aussi si on peut ajouter le WN8 des joueurs
    //http://wotlabs.net/eu/player/strong44
    /*
     * <div class="boxStats boxWn green" style="width:18%;float:left;margin-right:2.5%;margin-bottom:25px;">
View Full Code Here

Examples of org.jsoup.select.Elements

        final StringBuilder listBuilder = new StringBuilder();

        listBuilder.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + Latkes.getStaticPath() + "/plugins/list/style.css\" />");

        final Elements hs = doc.select("h1, h2, h3, h4, h5");

        listBuilder.append("<ul class='b3-solo-list'>");
        for (int i = 0; i < hs.size(); i++) {
            final Element element = hs.get(i);
            final String tagName = element.tagName().toLowerCase();
            final String text = element.text();
            final String id = "b3_solo_" + tagName + "_" + i;

            element.before("<span id='" + id + "'></span>");
View Full Code Here

Examples of org.jsoup.select.Elements

          sink.text( bundle.getString( "report.fitnesse.name" ) );
          sink.sectionTitle1_();
      for(String report : reports) {
                //String html = html(report);
                Document document = Jsoup.parse(new File(this.reportsDir, report), null);
                Elements tables = document.getElementsByTag("table");
                // Is it a top-level index page?
                if(tables.size() == 1 &&
                    testTdElements(tables.get(0).getElementsByTag("td"), "name", "right", "wrong", "exceptions")) {
                     
                  Elements hrefs = document.getElementsByTag("a");
                  for(Element href : hrefs) {
                    String extant = href.attr("href");
                    href.attr("href", OUTPUT_NAME + "." + extant);
                  }
                    sink.rawText(document.html());
View Full Code Here

Examples of org.jsoup.select.Elements

              final File testFile =  new File(this.reportsDir, test);
              final Document testHtml = parseHtml(testFile);
              final List<Element> errors = testHtml.getElementsByClass("error");
              for(int k = 0 ; k < errors.size() && logErrorsToConsole() ; k++) {
                final Element error = errors.get(k);
                final Elements fitLabel = error.getElementsByClass("fit_label");
                if(!fitLabel.isEmpty()) {
                  logFitNesseError(test, fitLabel.text());
                }
                final Elements fitStacktrace = error.getElementsByClass("fit_stacktrace");
                if(!fitStacktrace.isEmpty()) {
                  logFitNesseError(test, fitStacktrace.text());
                }
              }
              final List<Element> details = testHtml.getElementsByClass("exception-detail");
              for(int k = 0 ; k < details.size() && logErrorsToConsole() ; k++) {
                final Element detail = details.get(k);
View Full Code Here

Examples of org.jsoup.select.Elements

    return content.toString();
  }

  public void transformString(String channelString) {
    Document doc = Jsoup.parse(channelString);
    Elements tmp;
    tmp = doc.select("alias");
    if (tmp != null) {
      this.alias = (tmp.text());
    }
    tmp = doc.select("thumbImageUrl");
    if (tmp != null) {
      this.thumbImageUrl = (new Text(tmp.text()));
    }
    tmp = doc.select("title");
    if (tmp != null) {
      this.title = (new Text(tmp.text()));
    }
  }
View Full Code Here

Examples of org.jsoup.select.Elements

        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        Document html = Jsoup.parseBodyFragment(output);
        assertThat(output.trim(), not(equalTo("")));
       
        Elements container = html.select("div.form-group");
        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements nToManyWidgetElement = html.select("div.form-group > div.col-sm-10");
        assertThat(nToManyWidgetElement, notNullValue());

        Elements selectElement = nToManyWidgetElement.select(" > select");
        assertThat(selectElement.attr("id"), equalTo(manyToManyProperty));
        assertThat(selectElement.attr("multiple"), notNullValue());
        assertThat(selectElement.attr("ng-model"), equalTo(manyToManyProperty+"Selection"));
        String collectionElement = manyToManyProperty.substring(0, 1);
        String optionsExpression = collectionElement +".text for "+ collectionElement +" in " + manyToManyProperty + "SelectionList";
        assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
    }
View Full Code Here

Examples of org.jsoup.select.Elements

        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        Document html = Jsoup.parseBodyFragment(output);
        assertThat(output.trim(), not(equalTo("")));

        Elements container = html.select("div.form-group");
        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));

        Elements oneToOneWidgetElement = html.select("div.form-group > div.col-sm-10");
        assertThat(oneToOneWidgetElement, notNullValue());

        Elements selectElement = oneToOneWidgetElement.select(" > select");
        assertThat(selectElement, notNullValue());
        assertThat(selectElement.attr("id"), equalTo(oneToOneProperty));
        String collectionElement = oneToOneProperty.substring(0, 1);
        String optionsExpression = collectionElement + ".text for " + collectionElement + " in "
                + oneToOneProperty + "SelectionList";
        assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
        assertThat(selectElement.attr("ng-model"), equalTo(oneToOneProperty + "Selection"));
    }
View Full Code Here

Examples of org.osm.jsoup.select.Elements

     */
    Element picEt = doc.getElementById("plVideosList");
    String time = null;
    String pic = null;
    if (picEt != null) {
      Elements pics = picEt.getElementsByTag("img");
      pic = pics.get(0).attr("src");

      /**
       * 获取视频时长
       */
      Element timeEt = picEt.select("span.review>cite").first();
View Full Code Here

Examples of ru.vagrant_ai.questionmarkgame.obj.Elements

    player.gun = new Gun();
    hp = new HPBar();
    monster = new MonsterHandler(); //not a single monster, but a class controlling randomly generated monsters
    monster_controller = new MonsterWaveController();
    dispenser = new Dispenser();
    elements = new Elements();
    border = new Rectangle(-5,-5,Game.app_x+5,ground_level+47); //Bullet rectangle border
    background = new Background();
    scene_handler = new SceneHandler();
    sound_handler = new Sound();
   
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.