code: void toStringRep(String indent, XAppender out) {
          out.append(indent).append("<");
          out.append(name);
          if (attributes.size() > 0) {
              for (String an : attributes.keySet()) {
                  out.append(" ").append(an).append("='").append(sanitize(attributes.get(an))).append("'");
              }
          }
  
          if (children.size() == 0) {
              if (content == null) {
                  out.append("/>");
              } else {
                  out.append(">");
                  out.append(sanitize(content));
                  out.append("</");
                  out.append(name);
                  out.append(">");
              }
          } else {
              if (content == null) {
                  out.append(String.format(">%n"));
              } else {
                  out.append(">");
                  out.append(sanitize(content));
                  out.append(String.format("%n"));
              }
              for (XElement e : children) {
                  e.toStringRep(indent + "  ", out);
              }
              out.append(indent).append("</");
              out.append(name);
              out.append(">");
          }
          out.append(String.format("%n"));
      }
docs: Convert the element into a pretty printed string representation.
  @param indent the current line indentation
  @param out the output