Beispiel #1
0
 public CheckXML(XmlSchemaSet xmlSchemas, ILogApp log)
 {
     _log      = log;
     move      = new MoveFile(log);
     schemaSet = new LoadSchema(log);
     settings  = new XmlReaderSettings();
     settings.Schemas.Add(xmlSchemas);
 }
Beispiel #2
0
        static async Task Main(string[] args)
        {
            ILogApp           log  = new LogApp();
            ConfigurationJson json = new ConfigurationJson(log);

            Config config = await json.Load();

            if (config != null)
            {
                LoadSchema schema = new LoadSchema(log);
                if (schema.AddPath(config.PathXSD) != false)
                {
                    XmlSchemaSet schemaSet = schema.AddSchema();
                    CheckXML     checkXML  = new CheckXML(schemaSet, log);

                    if (checkXML.addPath(config.PathXML) != false)
                    {
                        checkXML.CheckXml(config.PathMove);
                    }
                }
            }
            log.WriteLog(LogLevel.Info, $"Complite! (Press any key)");
            Console.ReadKey();
        }