Beispiel #1
0
        /// <summary>
        /// Validar o XML
        /// </summary>
        protected override void XmlValidar()
        {
            ValidarSchema validar = new ValidarSchema();

            validar.Validar(ConteudoXML, Path.Combine(Configuracoes.SchemaPasta, Configuracoes.SchemaArquivo), Configuracoes.TargetNS);

            if (!validar.Success)
            {
                throw new Exception(validar.ErrorMessage);
            }
        }
Beispiel #2
0
        private void ValidarXMLEvento(XmlDocument xml, string schemaArquivo, string targetNS)
        {
            var validar = new ValidarSchema();

            validar.Validar(xml, Path.Combine(Configuracoes.SchemaPasta, schemaArquivo), targetNS);

            if (!validar.Success)
            {
                throw new Exception(validar.ErrorMessage);
            }
        }