docs: public String toXML()
      {
          RepositoryTags tags = RepositoryTags.getInstance();
          String eol = SystemUtils.LINE_SEPARATOR;
  
          StringBuffer strReturn = new StringBuffer( 1024 );
          strReturn.append( eol );
          strReturn.append( "  <!-- Descriptor for Connection " );
          strReturn.append( getProtocol() );
          strReturn.append( ":" );
          strReturn.append( getSubProtocol() );
          strReturn.append( ":" );
          strReturn.append( getDbAlias() );
          strReturn.append( " -->" );
          strReturn.append( eol );
  
          strReturn.append( "  " );
          strReturn.append( tags.getOpeningTagNonClosingById( JDBC_CONNECTION_DESCRIPTOR ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( JCD_ALIAS, this.getJcdAlias() ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( DEFAULT_CONNECTION, "" + this.isDefaultConnection() ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( DBMS_NAME, this.getDbms() ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( JDBC_LEVEL, "" + this.getJdbcLevel() ) );
          strReturn.append( eol );
  
          //username is optional
          String user = getUserName();
          if( user != null )
          {
              strReturn.append( "    " );
              strReturn.append( tags.getAttribute( USER_NAME, user ) );
              strReturn.append( eol );
          }
          // password is optional
          String passwd = getPassWord();
          if( passwd != null )
          {
              strReturn.append( "    " );
              strReturn.append( tags.getAttribute( USER_PASSWD, passwd ) );
              strReturn.append( eol );
          }
  
          // JDBC Datasource or DriverManager information are alternatives:
          String dsn = getDatasourceName();
          if( dsn != null )
          {
              strReturn.append( "    " );
              strReturn.append( tags.getAttribute( DATASOURCE_NAME, this.getDatasourceName() ) );
              strReturn.append( eol );
          }
          else
          {
              strReturn.append( "    " );
              strReturn.append( tags.getAttribute( DRIVER_NAME, this.getDriver() ) );
              strReturn.append( eol );
              strReturn.append( "    " );
              strReturn.append( tags.getAttribute( URL_PROTOCOL, this.getProtocol() ) );
              strReturn.append( eol );
              strReturn.append( "    " );
              strReturn.append( tags.getAttribute( URL_SUBPROTOCOL, this.getSubProtocol() ) );
              strReturn.append( eol );
              strReturn.append( "    " );
              strReturn.append( encode( tags.getAttribute( URL_DBALIAS, this.getDbAlias() ) ) );
              strReturn.append( eol );
          }
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( EAGER_RELEASE, "" + this.getEagerRelease() ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( BATCH_MODE, "" + this.getBatchMode() ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( USE_AUTOCOMMIT, "" + this.getUseAutoCommit() ) );
          strReturn.append( eol );
          strReturn.append( "    " );
          strReturn.append( tags.getAttribute( IGNORE_AUTOCOMMIT_EXCEPTION, "" + this.isIgnoreAutoCommitExceptions() ) );
          strReturn.append( eol );
  
          strReturn.append( "  >" );
          strReturn.append( eol );
          strReturn.append( eol );
  
          strReturn.append( this.getConnectionPoolDescriptor().toXML() );
          strReturn.append( eol );
          if( this.getSequenceDescriptor() != null )
          {
              strReturn.append( this.getSequenceDescriptor().toXML() );
          }
          strReturn.append( eol );
          strReturn.append( "  " );
          strReturn.append( tags.getClosingTagById( JDBC_CONNECTION_DESCRIPTOR ) );
          strReturn.append( eol );
          return strReturn.toString();
      }