private static void AddXMLExtractConfigurationsToImporter(IDataImporter dataImporter) { var parserFactory = new DefaultXMLParserFactory(); var extensionValidationRule = new XMLFileNameExtensionMatchValidationRule(".xml", false); dataImporter.AddValidationRule(extensionValidationRule); var labNameValidationRule = new ElementValueMatchCriteriaValidationRule(new XMLDataSourceLocation("LabReport", "Lab_Name"), parserFactory, typeof(string), new RegexCriteria("^Lab1$")); dataImporter.AddValidationRule(labNameValidationRule); var labNameFieldExtractConfiguration = new SimpleXMLExtractConfiguration("", "Lab_Name", parserFactory.GetElementParser(typeof(string)), new SimpleValueAssigner(), typeof(string), "LabName"); var dateReportedFieldExtractConfiguration = new SimpleXMLExtractConfiguration("", "Date_Reported", parserFactory.GetElementParser(typeof(DateTime)), new SimpleValueAssigner(), typeof(DateTime), "DateReported"); var projectIDFieldExtractConfiguration = new SimpleXMLExtractConfiguration("", "Project_ID", parserFactory.GetElementParser(typeof(int)), new SimpleValueAssigner(), typeof(int), "ProjectId"); var sdgIDFieldExtractConfiguration = new SimpleXMLExtractConfiguration("", "SDG_ID", parserFactory.GetElementParser(typeof(int)), new SimpleValueAssigner(), typeof(int), "SDGID"); var labSignatoryFieldExtractConfiguration = new SimpleXMLExtractConfiguration("", "Lab_Signatory", parserFactory.GetElementParser(typeof(string)), new SimpleValueAssigner(), typeof(string), "LabSignatory"); dataImporter.AddExtractConfiguration(labNameFieldExtractConfiguration); dataImporter.AddExtractConfiguration(dateReportedFieldExtractConfiguration); dataImporter.AddExtractConfiguration(projectIDFieldExtractConfiguration); dataImporter.AddExtractConfiguration(sdgIDFieldExtractConfiguration); dataImporter.AddExtractConfiguration(labSignatoryFieldExtractConfiguration); }