Package org.jsoup.nodes

Examples of org.jsoup.nodes.Node.attr()


    String fileExtension = ".htm";
    Node ankerNode = null;
    for (Node node : indexLink.childNodes()) {
      if (node.hasAttr("href")) {
        ankerNode = node.clone();
        if (ankerNode.attr("href").contains(".html"))
          fileExtension = ".html";
        break;
      }
    }
    if (ankerNode == null)
View Full Code Here


    }
    if (ankerNode == null)
      throw new RuntimeException(
        "Cannot create index link because no cloneable TOC node has been found (should never happen)"
      );
    ankerNode.attr("href", "stichwort" + fileExtension);
    ((Element) ankerNode).text("Index");
    bodyTag.appendChild(ankerNode);
  }

  /**
 
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.