org.jsoup.nodes.Document.quirksMode()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.jsoup.nodes.Document.quirksMode()方法的一些代码示例,展示了Document.quirksMode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.quirksMode()方法的具体详情如下:
包路径:org.jsoup.nodes.Document
类名称:Document
方法名:quirksMode

Document.quirksMode介绍

暂无

代码示例

代码示例来源:origin: org.jsoup/jsoup

doc.quirksMode(context.ownerDocument().quirksMode());

代码示例来源:origin: org.jsoup/jsoup

boolean process(Token t, HtmlTreeBuilder tb) {
    if (isWhitespace(t)) {
      return true; // ignore whitespace
    } else if (t.isComment()) {
      tb.insert(t.asComment());
    } else if (t.isDoctype()) {
      // todo: parse error check on expected doctypes
      // todo: quirk state check on doctype ids
      Token.Doctype d = t.asDoctype();
      DocumentType doctype = new DocumentType(
        tb.settings.normalizeTag(d.getName()), d.getPublicIdentifier(), d.getSystemIdentifier());
      doctype.setPubSysKey(d.getPubSysKey());
      tb.getDocument().appendChild(doctype);
      if (d.isForceQuirks())
        tb.getDocument().quirksMode(Document.QuirksMode.quirks);
      tb.transition(BeforeHtml);
    } else {
      // todo: check not iframe srcdoc
      tb.transition(BeforeHtml);
      return tb.process(t); // re-process token
    }
    return true;
  }
},

代码示例来源:origin: org.jsoup/jsoup

tb.framesetOk(false);
} else if (name.equals("table")) {
  if (tb.getDocument().quirksMode() != Document.QuirksMode.quirks && tb.inButtonScope("p")) {
    tb.processEndTag("p");

代码示例来源:origin: astamuse/asta4d

doc.quirksMode(context.ownerDocument().quirksMode());

代码示例来源:origin: astamuse/asta4d

boolean process(Token t, Asta4DTagSupportHtmlTreeBuilder tb) {
    if (isWhitespace(t)) {
      return true; // ignore whitespace
    } else if (t.isComment()) {
      tb.insert(t.asComment());
    } else if (t.isDoctype()) {
      // todo: parse error check on expected doctypes
      // todo: quirk state check on doctype ids
      Token.Doctype d = t.asDoctype();
      DocumentType doctype = new DocumentType(d.getName(), d.getPublicIdentifier(), d.getSystemIdentifier(), tb.getBaseUri());
      tb.getDocument().appendChild(doctype);
      if (d.isForceQuirks())
        tb.getDocument().quirksMode(Document.QuirksMode.quirks);
      tb.transition(BeforeHtml);
    } else {
      // todo: check not iframe srcdoc
      tb.transition(BeforeHtml);
      return tb.process(t); // re-process token
    }
    return true;
  }
},

代码示例来源:origin: astamuse/asta4d

tb.framesetOk(false);
} else if (name.equals("table")) {
  if (tb.getDocument().quirksMode() != Document.QuirksMode.quirks && tb.inButtonScope("p")) {
    tb.process(new Token.EndTag("p"));

相关文章