XmlSchemaCollection can only add XSD and XDR schemas.
"Fruber Malcome" <fruber_malcome@msn.com> wrote in message
news:Ovrixx2mEHA.3988@tk2msftngp13.phx.gbl...
> 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
>
>
>
> "Martin Honnen" <mahotrash@yahoo.de> wrote in message
> news:efTlsWLbEHA.1732@TK2MSFTNGP09.phx.gbl...
> >
> >
> > Wayne Wengert wrote:
> >
> >> 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?
> >
> > 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/ > >
>
>