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