[Mono-list] Validation of XML
Herman Vega
hvegax at gmail.com
Mon Nov 28 15:28:38 EST 2005
Hi All...
I need to validate an Xml content and I have two ways:
* Using DTD file.
* Using XSD schema file.
The problem is that i have a DTD file that it's ok, work fine with
xmllint validation program. but my implementation with DTD Validation
don't work with mono. I decide to work with XSD validation schema and
work fine for me. Now i can validate a xml against XSD schema file
very well with mono.
But here it's the new problem... when i generate a XSD schema file
from XML using xsd.exe this generate a wrong XSD Schema file.
Now the 2 ways... (1) how i can generate a valid XSD schema file from
Xml (not manual) or (2) how i can validate a Xml using valid DTD file?
I attached the source files that I'm still working
The error using DTD validation:
$ mono ValidateXml.exe DTD activities.dtd activities.xml
Unhandled Exception: System.Xml.XmlException: Unexpected declaration
markup was found. file:///home/hvega/ticedu/xml/TestXml/activities.dtd
Line 2, position 3.
Regards
--
,''`. Herman Vega Jara <hvega at alumnos.ubiobio.cl>
: :' : Ing. ejec. Comp. e Inf. at UBB rlz!
`. `' http://gbtcr.chileforge.cl
`-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: activities.dtd
Type: text/x-dtd
Size: 2832 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20051128/70855c70/activities-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: activities.xml
Type: text/xml
Size: 20715 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20051128/70855c70/activities-0001.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: activities.xsd
Type: application/octet-stream
Size: 7281 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20051128/70855c70/activities-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ValidateXml.cs
Type: text/x-csharp
Size: 998 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20051128/70855c70/ValidateXml-0001.bin
More information about the Mono-list
mailing list