code: public String toXml(boolean pretty, boolean declaration, String... attrs) {
          String topNode = Inflector.pluralize(Inflector.underscore(metaModel.getModelClass().getSimpleName()));
  
          hydrate();
  
          StringBuilder sb = new StringBuilder();
          if(declaration) {
              sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
              if (pretty) sb.append('\n');
          }
          sb.append('<').append(topNode).append('>');
          if (pretty) { sb.append('\n'); }
          for (T t : delegate) {
              t.toXmlP(sb, pretty, pretty ? "  " : "", attrs);
          }
          sb.append("</").append(topNode).append('>');
          if (pretty) { sb.append('\n'); }
          return sb.toString();
      }
docs: Generates a XML document from content of this list.
  
  @param pretty pretty format (human readable), or one line text.
  @param declaration true to include XML declaration at the top
  @param attrs list of attributes to include. No arguments == include all attributes.
  @return generated XML.