/// <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); } }
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); } }