示例#1
0
 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);
   }
 }
示例#2
0
  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;
  }
示例#3
0
 public Document outputSettings(OutputSettings outputSettings) {
   Validate.notNull(outputSettings);
   this.outputSettings = outputSettings;
   return this;
 }
示例#4
0
 public OutputSettings indentAmount(int indentAmount) {
   Validate.isTrue(indentAmount >= 0);
   this.indentAmount = indentAmount;
   return this;
 }