]> git.llucax.com Git - z.facultad/75.10/miklolife.git/blobdiff - demo/src/Reportes/InfoPrestacionesReport.cs
- Valida contra el schema
[z.facultad/75.10/miklolife.git] / demo / src / Reportes / InfoPrestacionesReport.cs
index 277bef07ef211b4b577c5c6678ad7e18a4302305..b6cc3dcd545b0344cb862ffef404260a63ff866e 100644 (file)
@@ -32,8 +32,6 @@ namespace Reportes
 \r
                #region Campos Privados\r
 \r
-               private bool _esBienFormado = true;\r
-\r
                private string _pathArchivo = string.Empty;\r
                private string _cuitPrestador;\r
                private DateTime _fechaEnvio;\r
@@ -50,6 +48,11 @@ namespace Reportes
                        set { this._pathArchivo = value; }\r
                }\r
 \r
+               public string NombreArchivo\r
+               {\r
+                       get { return this.PathArchivo.Substring(this.PathArchivo.LastIndexOf(Path.DirectorySeparatorChar) + 1); }\r
+               }\r
+\r
                public string CuitPrestador\r
                {\r
                        get { return this._cuitPrestador; }\r
@@ -148,31 +151,12 @@ namespace Reportes
 \r
                        XmlValidatingReader valReader = new XmlValidatingReader( xmlDoc.OuterXml, XmlNodeType.Element, pc );\r
 \r
+                       valReader.Schemas.Add( string.Empty, this.XsdPathNombre );\r
                        valReader.ValidationType = ValidationType.Schema;\r
-                       //XmlSchemaCollection schemaColl = new XmlSchemaCollection();\r
-                       //schemaColl.Add( null, this.XsdPathNombre );\r
-                       \r
-                       valReader.Schemas.Add( "", this.XsdPathNombre ); // schemaColl );\r
 \r
                        valReader.ValidationEventHandler += new ValidationEventHandler(valReader_ValidationEventHandler);\r
 \r
-                       //while ( valReader.Read() );\r
-\r
-                       while (valReader.Read())\r
-                       {\r
-                               if (valReader.IsStartElement())\r
-                               {\r
-                                       if (valReader.Prefix==String.Empty)\r
-                                               Console.WriteLine("<{0}>", valReader.LocalName);\r
-                                       else\r
-                                       {\r
-                                               Console.Write("<{0}:{1}>", valReader.Prefix, valReader.LocalName);\r
-                                               Console.WriteLine(" The namespace URI is " +\r
-                                                       valReader.NamespaceURI);\r
-                                       }\r
-                               }\r
-                       }\r
-\r
+                       while (valReader.Read()) { }\r
 \r
                        valReader.Close();\r
 \r