class DragAndDropContainer implements XMLInterface {

  public String getXML() {
    try {
      StringBuilder xml = new StringBuilder( 100 );

      xml.append( XMLHandler.getXMLHeader() ); // UFT-8 XML header
      xml.append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR );

      if ( id != null ) {
        xml.append( "  " ).append( XMLHandler.addTagValue( "ID", id ) );
      }
      xml.append( "  " ).append( XMLHandler.addTagValue( "DragType", getTypeCode() ) );
      xml.append( "  " ).append(
        XMLHandler
          .addTagValue( "Data", new String( Base64.encodeBase64( data.getBytes( Const.XML_ENCODING ) ) ) ) );
      xml.append( XMLHandler.closeTag( XML_TAG ) ).append( Const.CR );

      return xml.toString();
    } catch ( UnsupportedEncodingException e ) {
      throw new RuntimeException( "Unable to encode String in encoding [" + Const.XML_ENCODING + "]", e );
    }
  }

  public  DragAndDropContainer( int type, String data );
  public  DragAndDropContainer( int type, String data, String id );
  public  DragAndDropContainer( String xml );

}