Package org.jsoup.nodes

Examples of org.jsoup.nodes.Document.body()


                child.remove();
                wrappingNode.appendChild(child);
            }
        }

        Element body = embedDoc.body();
        Elements bodyChildren = body.children();
        ElementUtil.appendNodes(wrappingNode, new ArrayList<Node>(bodyChildren));

        // copy all the attrs to the wrapping group node
        Iterator<Attribute> attrs = elem.attributes().iterator();
View Full Code Here


                child.remove();
                wrappingNode.appendChild(child);
            }
        }

        Element body = embedDoc.body();
        Elements bodyChildren = body.children();
        ElementUtil.appendNodes(wrappingNode, new ArrayList<Node>(bodyChildren));

        // copy all the attrs to the wrapping group node
        Iterator<Attribute> attrs = elem.attributes().iterator();
View Full Code Here

        String startPath = StringUtils.substringBefore( path, "/" );

        // replace all links !!
        Document document = Jsoup.parse( is, "UTF-8", "" );

        Element body = document.body().child( 0 );

        Elements links = body.select( "a[href]" );

        for ( Iterator<Element> elementIterator = links.iterator(); elementIterator.hasNext(); )
        {
View Full Code Here

    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !m_bSilent);
    }
   
    if (docLocal.body() == null) {
      throw new DownloadFailedException(
        PbnTools.getStr("error.noBody"), m_ow, false);
    }
   
    Elements elems = docLocal.select("a:matches(Lin)");
View Full Code Here

    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !m_bSilent);
    }
   
    if (docLocal.body() == null) {
      throw new DownloadFailedException(
        PbnTools.getStr("error.noBody"), m_ow, true);
    }
   
    // determining name of the file with missing content
View Full Code Here

      throw new DownloadFailedException(
        PbnTools.getStr("error.noBody"), m_ow, true);
    }
   
    // determining name of the file with missing content
    String sAjaxCmd = docLocal.body().attr("onload");
    if (sAjaxCmd.isEmpty()) {
      // nothing to do, no onload handler
      if (bWarn) { println(PbnTools.getStr("tourDown.msg.noOnLoad", sLocalFile)); }
      return;
    }
View Full Code Here

      return;
    }
    String sContentFile = m.group(1);
   
    // replacing the body of m.group(2) element
    Element elemToReplace = getOneTag(docLocal.body(), "div#" + m.group(2), false);
    if (elemToReplace == null) {
      throw new DownloadFailedException(
        PbnTools.getStr("tourDown.error.ajaxFailed", sLocalFile), m_ow, true);
    }
   
View Full Code Here

    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !bSilent);
    }
   
    // look for a link to the last one
    if (doc1.body() == null) {
      throw new DownloadFailedException(PbnTools.getStr("error.noBody"),
                                      m_ow, !bSilent);
    }
    Element elemLast = getOneTag(doc1.body(), "a[title=ostatnie]", false);
    if (elemLast == null) {
View Full Code Here

    // look for a link to the last one
    if (doc1.body() == null) {
      throw new DownloadFailedException(PbnTools.getStr("error.noBody"),
                                      m_ow, !bSilent);
    }
    Element elemLast = getOneTag(doc1.body(), "a[title=ostatnie]", false);
    if (elemLast == null) {
      throw new DownloadFailedException(
        PbnTools.getStr("error.getNumberOfDeals"), m_ow, !bSilent);
    }
   
View Full Code Here

    }
    if (!bSilent)
      println(PbnTools.m_res.getString("msg.documentLoaded"));

    if (!checkGenerator(doc, "JFR 2005", bSilent)) return false;
    if (doc.body() != null) {
      // only W- link has body
      // direct link has frames which should be read instead
      if (!checkTagText(doc.body(), "p.f", "^\\sPary\\..*$", bSilent)) {
        return false;
      }
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.