code: public void printElement(String name, String value, String... attributes) {
      startElement(name, attributes);
      if (value != null) { println(">" + escape(value) + "</" + name + ">"); } else { println("/>"); }
      outdent();
    }
docs: Output an element with the given content (value). The opening and closing tags are
  output in a single operation.
  @param name Name of the element.
  @param value Contents of the element.
  @param attributes Alternate names and values of attributes for the element.