public String getXML() {
    StringBuilder retval = new StringBuilder();

    retval.append( "    " + XMLHandler.addTagValue( INCLUDE, includeFilename ) );
    retval.append( "    " + XMLHandler.addTagValue( INCLUDE_FIELD, filenameField ) );
    retval.append( "    " + XMLHandler.addTagValue( ROWNUM, includeRowNumber ) );
    retval.append( "    " + XMLHandler.addTagValue( ADDRESULTFILE, addresultfile ) );
    retval.append( "    " + XMLHandler.addTagValue( IS_IGNORE_EMPTY_FILE, IsIgnoreEmptyFile ) );
    retval.append( "    " + XMLHandler.addTagValue( IS_IGNORE_MISSING_PATH, IsIgnoreMissingPath ) );

    retval.append( "    " + XMLHandler.addTagValue( ROWNUM_FIELD, rowNumberField ) );
    retval.append( "    " + XMLHandler.addTagValue( ENCODING, encoding ) );

    retval.append( "    <" + FILE + ">" + Const.CR );
    for ( int i = 0; i < fileName.length; i++ ) {
      retval.append( "      " + XMLHandler.addTagValue( NAME, fileName[i] ) );
      retval.append( "      " + XMLHandler.addTagValue( FILEMASK, fileMask[i] ) );
      retval.append( "      " ).append( XMLHandler.addTagValue( EXCLUDE_FILEMASK, excludeFileMask[i] ) );
      retval.append( "      " ).append( XMLHandler.addTagValue( FILE_REQUIRED, fileRequired[i] ) );
      retval.append( "      " + XMLHandler.addTagValue( INCLUDE_SUBFOLDERS, includeSubFolders[i] ) );
    }
    retval.append( "      </" + FILE + ">" + Const.CR );

    retval.append( "    <" + FIELDS + ">" + Const.CR );
    for ( int i = 0; i < inputFields.length; i++ ) {
      LoadFileInputField field = inputFields[i];
      retval.append( field.getXML() );
    }
    retval.append( "      </" + FIELDS + ">" + Const.CR );
    retval.append( "    " + XMLHandler.addTagValue( LIMIT, rowLimit ) );
    retval.append( "    " + XMLHandler.addTagValue( IS_IN_FIELDS, fileinfield ) );
    retval.append( "    " + XMLHandler.addTagValue( DYNAMIC_FILENAME_FIELD, DynamicFilenameField ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( SHORT_FILE_FIELD_NAME, shortFileFieldName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( PATH_FIELD_NAME, pathFieldName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( HIDDEN_FIELD_NAME, hiddenFieldName ) );
    retval.append( "    " ).append(
        XMLHandler.addTagValue( LAST_MODIFICATION_TIME_FIELD_NAME, lastModificationTimeFieldName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( URI_NAME_FIELD_NAME, uriNameFieldName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( ROOT_URI_NAME_FIELD_NAME, rootUriNameFieldName ) );
    retval.append( "    " ).append( XMLHandler.addTagValue( EXTENSION_FIELD_NAME, extensionFieldName ) );

    return retval.toString();
  }
@Test
  public void testGetXML() throws Exception {
    LoadFileInputMeta testMeta = createMeta();
    String xml = testMeta.getXML();
    assertEquals( xmlOrig.replaceAll( "\n", "" ).replaceAll( "\r", "" ), xml.replaceAll( "\n", "" ).replaceAll( "\r",
        "" ) );
  }