code: public void printElement(String elementName, String value, Map<String, String> attributes) {
      print("<" + elementName);
  
      for (Entry<String, String> entry : attributes.entrySet()) {
        print(" " + entry.getKey() + "=\"" + escape(entry.getValue()) + "\"");
      }
  
      if (value != null) {
        println(">" + escape(value) + "</" + elementName + ">");
      } else {
        println("/>");
      }
    }
docs: Output a complete element with the given content and attributes.
  @param elementName Name of element.
  @param value Content of element.
  @param attributes A map of name value pairs which will be used to add attributes to
  the element.