Groups | Blog | Home
all groups > dotnet xml > july 2004 >

dotnet xml : Confused About Validation


Wayne Wengert
7/17/2004 10:39:07 AM
I have an XML document and a corresponding xsd document I built. I want to
validate the xml document against that Schema but when I use the MSDN
validator it has no place to select the xsd document? It has a checkmark for
"Validate" but I have no idea what it is using as the Schema?

Where can I find a validator that lets me specify the xml document and the
xsd Schema to use for validation?

Wayne

Wayne Wengert
7/18/2004 6:33:00 AM
Thank you for the reply.

Wayne

[quoted text, click to view]

Martin Honnen
7/18/2004 12:54:56 PM


[quoted text, click to view]

As you are asking in the dotnet group here is a web interface to some
validator written using the .NET classes:
http://apps.gotdotnet.com/xmltools/xsdvalidator/
Of course it is rather easy and indeed described in the .NET SDK how to
write a short C# program performing the validation yourself.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Fruber Malcome
9/15/2004 2:39:12 PM
Could either of you or anyone answer this question - or tell me if it's
possible?

I have this collection of XML files that do not define a doctype, therefore
explorer etc just says that a particular entity is undeclared.
When using a validator so that I can validate the xml file, I create an
XmlValidatingReader, setting the validation type to DTD.
Then I add both the dtd and an entities.txt file (which is all the entities
defined in xml format).

When the SchemaCollection tries to .Add (null, dtdFile) - I get an exception
saying that Doctype is not defined.
When looking at the dtd, it looks like a normal dtd file - but there too is
no doctype being define.

Without having to modify every xml file to have a docType, is there
something I can do to this dtd file so that the SchemaCollection will add
it, then use it to load / validate the xml files?

Any help would be appreciated.

thanks - bill



[quoted text, click to view]

Zafar Abbas [MSFT]
9/17/2004 6:06:12 PM
XmlSchemaCollection can only add XSD and XDR schemas.
DTDs have to be included or referred from an XML file.


[quoted text, click to view]

AddThis Social Bookmark Button