From 15be33679d438f2d74de7f5aef118103fb12df57 Mon Sep 17 00:00:00 2001 From: Guillermo Rugilo Date: Wed, 6 Jul 2005 15:52:07 +0000 Subject: [PATCH] - Agregado de .glade al proyecto VS - Validacion del xml contra schema funcionando OK --- demo/src/Reportes/InfoPrestacionesReport.cs | 23 ++------------- demo/src/VSProject.csproj | 32 +++++++++++++++++++++ 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/demo/src/Reportes/InfoPrestacionesReport.cs b/demo/src/Reportes/InfoPrestacionesReport.cs index 277bef0..a127f1c 100644 --- a/demo/src/Reportes/InfoPrestacionesReport.cs +++ b/demo/src/Reportes/InfoPrestacionesReport.cs @@ -148,31 +148,12 @@ namespace Reportes XmlValidatingReader valReader = new XmlValidatingReader( xmlDoc.OuterXml, XmlNodeType.Element, pc ); + valReader.Schemas.Add( string.Empty, this.XsdPathNombre ); valReader.ValidationType = ValidationType.Schema; - //XmlSchemaCollection schemaColl = new XmlSchemaCollection(); - //schemaColl.Add( null, this.XsdPathNombre ); - - valReader.Schemas.Add( "", this.XsdPathNombre ); // schemaColl ); valReader.ValidationEventHandler += new ValidationEventHandler(valReader_ValidationEventHandler); - //while ( valReader.Read() ); - - while (valReader.Read()) - { - if (valReader.IsStartElement()) - { - if (valReader.Prefix==String.Empty) - Console.WriteLine("<{0}>", valReader.LocalName); - else - { - Console.Write("<{0}:{1}>", valReader.Prefix, valReader.LocalName); - Console.WriteLine(" The namespace URI is " + - valReader.NamespaceURI); - } - } - } - + while (valReader.Read()) { } valReader.Close(); diff --git a/demo/src/VSProject.csproj b/demo/src/VSProject.csproj index 5c6fe98..53f59f0 100644 --- a/demo/src/VSProject.csproj +++ b/demo/src/VSProject.csproj @@ -116,14 +116,30 @@ RelPath = "abm_generico.glade" BuildAction = "EmbeddedResource" /> + + + + + + + +