Java 类org.jsoup.helper.W3CDom 实例源码

项目:common    文件:UrlConnectTest.java   
@Test
public void fetchToW3c() throws IOException {
    String url = "https://jsoup.org";
    Document doc = Jsoup.connect(url).get();

    W3CDom dom = new W3CDom();
    org.w3c.dom.Document wDoc = dom.fromJsoup(doc);
    assertEquals(url, wDoc.getDocumentURI());
    String html = dom.asString(wDoc);
    assertTrue(html.contains("jsoup"));
}
项目:astor    文件:UrlConnectTest.java   
@Test
public void fetchToW3c() throws IOException {
    String url = "http://jsoup.org";
    Document doc = Jsoup.connect(url).get();

    W3CDom dom = new W3CDom();
    org.w3c.dom.Document wDoc = dom.fromJsoup(doc);
    assertEquals(url, wDoc.getDocumentURI());
    String html = dom.asString(wDoc);
    assertTrue(html.contains("jsoup"));
}
项目:astor    文件:UrlConnectTest.java   
@Test
public void fetchToW3c() throws IOException {
    String url = "https://jsoup.org";
    Document doc = Jsoup.connect(url).get();

    W3CDom dom = new W3CDom();
    org.w3c.dom.Document wDoc = dom.fromJsoup(doc);
    assertEquals(url, wDoc.getDocumentURI());
    String html = dom.asString(wDoc);
    assertTrue(html.contains("jsoup"));
}
项目:astor    文件:UrlConnectTest.java   
@Test
public void fetchToW3c() throws IOException {
    String url = "https://jsoup.org";
    Document doc = Jsoup.connect(url).get();

    W3CDom dom = new W3CDom();
    org.w3c.dom.Document wDoc = dom.fromJsoup(doc);
    assertEquals(url, wDoc.getDocumentURI());
    String html = dom.asString(wDoc);
    assertTrue(html.contains("jsoup"));
}
项目:teammates    文件:HtmlHelper.java   
private static Node getNodeFromString(String string) {
    return new W3CDom().fromJsoup(Jsoup.parse(string));
}