import net.htmlparser.jericho.*; public class HTMLParserExample { public static void main(String[] args) { Element h1 = source.getFirstElement(HTMLElementName.H1); String title = h1.getTextExtractor().toString(); h1.getContent().clear(); h1.appendChild(new TextExtractor("Welcome to my website!")); } }


上一篇:
下一篇:
切换中文