use*_*572 5 html java android dom jsoup
我在向Document添加新标签时遇到了一些麻烦.例如,我有:
Document doc = Jsoup.parse(htmlString);
Element table = doc.select("table").first();
Run Code Online (Sandbox Code Playgroud)
现在,如果我想将一个<LINK>带有属性(href,type,rel)的标记添加到我的表元素中,然后将total返回为字符串,我该怎么做?
使用这样的东西:
Jsoup.parse(new URL(""), 0).getElementById("test").appendElement("h1").attr("id", "header").text("Welcome");
Run Code Online (Sandbox Code Playgroud)
以及所有".append*"方法.