Package org.jsoup.nodes

Examples of org.jsoup.nodes.Element.text()


        return builder.toString();
    }

    protected void addTitle(Document doc, StringBuilder builder) {
        Element element = doc.getElementsByTag("h1").first();
        builder.append(element.text()).append("\n\n");
    }

    protected void addPanels(Document doc, StringBuilder builder) {
        Elements elements = doc.getElementsByTag("ac:structured-macro");
        for (Element element : elements) {
View Full Code Here


        Elements bodies = element.getElementsByTag("ac:rich-text-body");
        if (!bodies.isEmpty()) {
            Element body = bodies.first();
            cleanNodes(body, "div");
            cleanNodes(body, "p");
            builder.append(body.text().replaceAll("<br/>", "\n")).append("\n");
        }
    }

    protected void addExamples(Document doc, StringBuilder builder) {
        Elements tables = doc.getElementsByTag("table");
View Full Code Here

    double latitude = Double.parseDouble(coordinates[0]);
    double longitude = Double.parseDouble(coordinates[1]);
    location.addProperty("latitude", latitude);
    location.addProperty("longitude", longitude);
      }
      location.addProperty("location_text", loc.text());
      status.add("location", location);
  }

  return status;
    }
View Full Code Here

        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>");

            listBuilder.append("<li class='b3-solo-list-").append(tagName).append("'><a href='#").append(id).append("'>").append(text).append(
View Full Code Here

              }
              final List<Element> details = testHtml.getElementsByClass("exception-detail");
              for(int k = 0 ; k < details.size() && logErrorsToConsole() ; k++) {
                final Element detail = details.get(k);
                if(detail.hasText()) {
                  logFitNesseError(test, StringUtils.substringAfter(detail.text(), SlimServer.EXCEPTION_TAG));
                }
              }
          }
        }
  }
View Full Code Here

    if (el != null) {
      Account account = new Account();
      account.setName(el.getElementById("headerSectionLeft").select("span.cardTitle a").text());
      account.setAccountType(AccountType.LIABILITY);
      Element link = el.select("div.summaryTitles a").first();
      account.setAccountNumber(link.text());
      account.setCurrency(Currency.getInstance("SEK"));
      account.setId(parseAccountId(link));

      String balance = doc.getElementById("colOSBalance").select("div.summaryValues").text();
      balance = balance.replaceAll("[^\\d-,]", "").replace(",", ".");
View Full Code Here

                  if(cell.getCellType()==Cell.CELL_TYPE_FORMULA){
                    td.attr("formula","="+cell.getCellFormula());
                  }else if(cell.getCellType()==Cell.CELL_TYPE_BLANK){
                   
                  }else if(cell.getCellType()==Cell.CELL_TYPE_BOOLEAN){
                    td.text(String.valueOf(cell.getBooleanCellValue()));
                  }else if(cell.getCellType()==Cell.CELL_TYPE_ERROR){
                    td.text("Error:"+String.valueOf(cell.getErrorCellValue()));
                  }else if(cell.getCellType()==Cell.CELL_TYPE_NUMERIC){
                    String strValue = null;
                    if(cell instanceof HSSFCell){
View Full Code Here

                  }else if(cell.getCellType()==Cell.CELL_TYPE_BLANK){
                   
                  }else if(cell.getCellType()==Cell.CELL_TYPE_BOOLEAN){
                    td.text(String.valueOf(cell.getBooleanCellValue()));
                  }else if(cell.getCellType()==Cell.CELL_TYPE_ERROR){
                    td.text("Error:"+String.valueOf(cell.getErrorCellValue()));
                  }else if(cell.getCellType()==Cell.CELL_TYPE_NUMERIC){
                    String strValue = null;
                    if(cell instanceof HSSFCell){
                      HSSFCell hssfCell = (HSSFCell)cell;
                      if(HSSFDateUtil.isCellDateFormatted(hssfCell)){
View Full Code Here

                        }
//                        xssfCell.getCellStyle().getDataFormatString();
//                        td.text(String.valueOf(cell.getNumericCellValue()));
                      }
                    }
                    td.text(strValue);
                  }else if(cell.getCellType()==Cell.CELL_TYPE_STRING){
                    td.text(cell.getStringCellValue());
                  }
                  if(sheet instanceof HSSFSheet){
                    HSSFSheet hssfSheet = (HSSFSheet)sheet;
View Full Code Here

//                        td.text(String.valueOf(cell.getNumericCellValue()));
                      }
                    }
                    td.text(strValue);
                  }else if(cell.getCellType()==Cell.CELL_TYPE_STRING){
                    td.text(cell.getStringCellValue());
                  }
                  if(sheet instanceof HSSFSheet){
                    HSSFSheet hssfSheet = (HSSFSheet)sheet;
                    HSSFCell hssfCell = (HSSFCell)cell;
                    HSSFCellStyle style = hssfCell.getCellStyle();
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.