public void title(String title) { Validate.notNull(title); Element titleEl = getElementsByTag("title").first(); if (titleEl == null) { head().appendElement("title").text(title); } else { titleEl.text(title); } }
public static Document createShell(String baseUri) { Validate.notNull(baseUri); Document doc = new Document(baseUri); Element html = doc.appendElement("html"); html.appendElement("head"); html.appendElement("body"); return doc; }
public Document outputSettings(OutputSettings outputSettings) { Validate.notNull(outputSettings); this.outputSettings = outputSettings; return this; }