code: public void openElement(String name, Map<String, String> attributes) {
      elementStack.push(name);
      print("<" + name);
  
      for (Entry<String, String> entry : attributes.entrySet()) {
        print(" " + entry.getKey() + "=\"" + escape(entry.getValue()) + "\"");
      }
      if (this.isNoNl()) {
        print(">");
      } else {
        println(">");
      }
      indent();
    }
docs: Open an XML element with the given name, and attributes. A call to closeElement() will output
  the appropriate XML closing tag. This class remembers the tag names.
  @param name Name of the XML element to open.
  @param attributes A map of name value pairs which will be used to add attributes to
  the element.