Exemple #1
0
        private void ValidateXml(out string[] errors, out string[] warnings)
        {
            if (this.OnlyValidateWellFormedness)
            {
                errors   = new string[0];
                warnings = new string[0];

                //Test for well-formedness
                try
                {
                    XmlDocument doc = new XmlDocument();
                    doc.LoadXml(this.XmlContent);
                }
                catch (XmlException ex)
                {
                    errors = new string[] { ex.Message };
                }
            }
            else
            {
                XmlValidator.ValidateResourceXmlContent(this.XmlContent, this.XsdPath, out errors, out warnings);
            }
        }
 private void ValidateXml(out string[] errors, out string[] warnings)
 {
     XmlValidator.ValidateResourceXmlContent(editor.XmlContent, this.XsdPath, out errors, out warnings);
 }