code: private void writeTag(String tag, String value) throws IOException {
      printIndents();
      if(value.length() > 0) {
        write("<" + tag + ">" + value + "</" + tag + ">\n");
      } else {
        write("<" + tag + "/>\n");
      }
    }
docs: Write an XML tag
  
  @param tag a tag name
  @param value a tag value