private void XmlValidationHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     Error.Append("Validation error: Severity=" + e.Severity).Append(System.Environment.NewLine)
     .Append("Message: " + e.Message)
     .Append(System.Environment.NewLine + System.Environment.NewLine);
     _stop = true;
 }
Beispiel #2
0
 // Display any validation errors.
 private void XmlReader_ValidationCallBack(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Exception != null)
     {
         ProcessException(e.Exception);
     }
 }
Beispiel #3
0
 // Display any validation errors.
 private void XmlSchema_ValidationCallBack(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Exception != null)
     {
         ProcessException(e.Exception);
     }
     //Console.WriteLine("    Validation Error: {0}" & vbCrLf, e.Message)
 }
Beispiel #4
0
 internal void RS_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     //if (e.Severity == System.Xml.Schema.XmlSeverityType.Error)
     {
         _isValid = false;
         _param.Log.Write(LogType.Error, "Meta file is invalid, " + e.Message);
     }
 }
Beispiel #5
0
 void XMLReadSet_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Severity == System.Xml.Schema.XmlSeverityType.Error)
     {
         ErrorMessage += "Hata Mesajı: " + e.Message + "\r\n";
     }
     else
     {
         ErrorMessage += "Uyarı Mesajı: " + e.Message + "\r\n";
     }
 }
 private static void ValidationCallBack(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Severity == System.Xml.Schema.XmlSeverityType.Warning)
     {
         Console.WriteLine("Warning: Matching schema not found.  No validation occurred." + e.Message);
     }
     else // Error
     {
         Console.WriteLine("Validation error: " + e.Message);
     }
 }
Beispiel #7
0
 public void SchemaValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Severity == System.Xml.Schema.XmlSeverityType.Error)
     {
         _validationErrors.Add(e.Message);
     }
     else
     {
         _validationWarnings.Add(e.Message);
     }
 }
Beispiel #8
0
 //Herhangi bir hata ile karşılaşıldığında burası çalışıyor
 private void Ayarlar_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Severity == System.Xml.Schema.XmlSeverityType.Error)
     {
         Hatalar += "Hata -->" + e.Message + "\r\n";
         // "\r" paragraf sonu, mesela not defretie yazdıracaksak enter için n değil r istiyor
     }
     else
     {
         Hatalar += "Uyarı -->" + e.Message + "\r\n";
     }
 }
Beispiel #9
0
 public void transferSettingsValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     if (e.Severity == System.Xml.Schema.XmlSeverityType.Warning)
     {
         Console.Write("WARNING: ");
         Console.WriteLine(e.Message);
     }
     else if (e.Severity == System.Xml.Schema.XmlSeverityType.Error)
     {
         checkOk = false;
         Console.Write("ERROR: ");
         Console.WriteLine(e.Message);
     }
 }
Beispiel #10
0
        /// <summary>
        /// Error found in XML
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Settings_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
        {
            string error = String.Empty;

            if (e.Severity == System.Xml.Schema.XmlSeverityType.Warning)
            {
                error = String.Format("Warning: Matching Schema not found. No validation occurred. {0}", e.Message);
            }
            else
            {
                error = String.Format("Validation error on line {0:000}, position {1:000}: {2:000}", e.Exception.LineNumber, e.Exception.LinePosition, e.Message);
            }
            rtbOutput.AppendText(error, Color.Red, m_Font);
            rtbOutput.AppendText(Environment.NewLine);
        }
Beispiel #11
0
 /// <summary>
 /// Manage any warnings or errors during the validation of the xml formated files (global_usage, domains.xml or urls.xml).
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private static void xmlValidationCallBack(object sender, System.Xml.Schema.ValidationEventArgs args)
 {
     if (args.Severity == System.Xml.Schema.XmlSeverityType.Warning)
     {
         clsLogProcessing.WriteToEventLog(string.Format("Advertencia: discordancia en el esquema mientras se " +
                                                        "genera el fichero {0}. No se validó el elemento en cuestión. A continuación se muestra un mensaje " +
                                                        "de error que le puede servir:" + Environment.NewLine + "", "global_usage.xml", args.Message), EventLogEntryType.Warning);
     }
     else
     {
         clsLogProcessing.WriteToEventLog(string.Format("Error al comprobar el esquema (schema) XML del fichero de indice " +
                                                        "\"global_usage.xml\" o de alguno de los de contenido (\"domains.xml\" ó \"urls.xml\'). " + Environment.NewLine +
                                                        "La descripción de este error se muestra a continuación: {0}", args.Message), EventLogEntryType.Error);
     }
 }
Beispiel #12
0
 private void Settings_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs args)
 {
     // Checking if the message results from a bug (?) in the .NET libs.
     // The message would be, e.g.,
     // Validating file C:\lokaali\lokaali_ws\vs2015-cocop\MessageSerialiser\XmlValidationDev\testfiles\valid1.xml...
     // The document is not valid.Got 1 validation message(s):
     // 1: Error: The global element 'http://foo.com/xyz/myelement' has already been declared.
     if (args.Message.ToLower().Contains("the global element") &&
         args.Message.ToLower().Contains("has already been declared"))
     {
         return;
     }
     else
     {
         // Adding event information to validation messages
         var msg = string.Format("{0}: {1}", args.Severity.ToString(), args.Message);
         m_validationMessages.Add(msg);
     }
 }
Beispiel #13
0
 private static void ValidationEvent(object sender, System.Xml.Schema.ValidationEventArgs args)
 {
     throw new FormatException("Particle System XML data failed Schema Validation\n" + args.Exception.ToString());
 }
 static void XmlValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     bool debug = true; // ignore
 }
Beispiel #15
0
 void settings_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     validationError = true;
     ShowResults(e.Message);
 }
 private void Settings_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     throw new NotImplementedException();
 }
Beispiel #17
0
 private void XmlSchema_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     throw new MetadataFileException(e.Message, e.Exception);
 }
Beispiel #18
0
 private static void ValidationError(object sender, System.Xml.Schema.ValidationEventArgs arguments)
 {
 }
Beispiel #19
0
 void Xrs_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     MyLogger.log(MethodBase.GetCurrentMethod());
 }
Beispiel #20
0
 private void Settings_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     throw e.Exception;
 }
Beispiel #21
0
 void settings_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     MessageBox.Show(e.Message);
 }
Beispiel #22
0
 private void validationHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine("Validation Error: {0}", e.Message);
 }
 /// <summary>
 /// Collects detailed information related to the XmlValidatingReader
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void OnValidation(object sender, System.Xml.Schema.ValidationEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.Severity + Environment.NewLine + e.Message);
 }
Beispiel #24
0
 private void ValidationCallBack(object sender, System.Xml.Schema.ValidationEventArgs args)
 {
     // The xml does not match the schema.
     Console.WriteLine("chungo pastel");
 }