Пример #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;
 }