Java 类org.jsoup.nodes.DocumentType 实例源码

项目:common    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
          for (Node n : family) {
              if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false;
          }
        return true;
}
项目:gestock    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
        for (int i = 0; i < family.size(); i++) {
            Node n = family.get(i);
            if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false; 
        }
        return true;
}
项目:CN1ML-NetbeansModule    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
        for (int i = 0; i < family.size(); i++) {
            Node n = family.get(i);
            if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false; 
        }
        return true;
}
项目:astor    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
          for (Node n : family) {
              if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false;
          }
        return true;
}
项目:astor    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
          for (Node n : family) {
              if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false;
          }
        return true;
}
项目:astor    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
          for (Node n : family) {
              if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false;
          }
        return true;
}
项目:BoL-API-Parser    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
        for (int i = 0; i < family.size(); i++) {
            Node n = family.get(i);
            if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false; 
        }
        return true;
}
项目:adan    文件:Header.java   
public static void main(String args[]){
    Document doc = Document.createShell("");
    DocumentType type = new DocumentType("html","","","");
    doc.prependChild(type);
    Header h = new Header(doc);
    h.addTitle("Yes sir!");
    String[] a= {"rel", "bb", "size", "100p", "href", "kjasldlasjd"};
    h.addlink(a);
    h.addMeta("hell", "yes");
    System.out.println(doc);
}
项目:adan    文件:ScheduleDocument.java   
public ScheduleDocument(){
    doc = Document.createShell("");
    doc.outputSettings().escapeMode(EscapeMode.xhtml);
    DocumentType type = new DocumentType("html", "", "", "");
    doc.prependChild(type);
    doc.select("html").attr("class", "js no-touch geolocation backgroundsize csstransforms csstransforms3d audio localstorage inlinesvg pointerevents webaudio mediaqueries getusermedia");

}
项目:AngelList-Mobile    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
        for (int i = 0; i < family.size(); i++) {
            Node n = family.get(i);
            if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false; 
        }
        return true;
}
项目:jsoup-learning    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
        for (int i = 0; i < family.size(); i++) {
            Node n = family.get(i);
            if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false; 
        }
        return true;
}
项目:idylfin    文件:Evaluator.java   
@Override
public boolean matches(Element root, Element element) {
        List<Node> family = element.childNodes();
        for (int i = 0; i < family.size(); i++) {
            Node n = family.get(i);
            if (!(n instanceof Comment || n instanceof XmlDeclaration || n instanceof DocumentType)) return false; 
        }
        return true;
}
项目:touchkit    文件:ViewPortSettings.java   
@Override
public void modifyBootstrapPage(BootstrapPageResponse response) {

    Document document = response.getDocument();

    Element html = document.getElementsByTag("html").get(0);
    Element head = document.getElementsByTag("head").get(0);

    DocumentType doctype = (DocumentType) html.previousSibling();
    DocumentType html5doc = new DocumentType("html", "", "", "");
    doctype.replaceWith(html5doc);

    Element element = document.createElement("meta");
    element.attr("name", "viewport");
    StringBuilder content = new StringBuilder();
    boolean open = false;
    open = addViewPortRule(content, open, "width", getViewPortWidth());
    if (!isViewPortUserScalable()) {
        open = addViewPortRule(content, open, "user-scalable", "no");
    }
    open = addViewPortRule(content, open, "initial-scale",
            getViewPortInitialScale());
    open = addViewPortRule(content, open, "maximum-scale",
            getViewPortMaximumScale());
    open = addViewPortRule(content, open, "minimum-scale",
            getViewPortMaximumScale());
    element.attr("content", content.toString());
    head.appendChild(element);

    // meta tag to disable gray tap highlights in WP8 (note, for some reason
    // these do not appear in W8, not even RT)
    // <meta name="msapplication-tap-highlight" content="no" />
    element = document.createElement("meta");
    element.attr("name", "msapplication-tap-highlight");
    element.attr("content", "no");
    head.appendChild(element);

}