In .NET 2.0, You can chain multiple readers and hence wrap a dtd validating
reader with a schema validating reader to get the same file to pass through
DTD/Schema validation at the same time.
XmlReaderSettin gs settings = new XmlReaderSettin gs();
settings.Valida tionType = ValidationType. DTD;
XmlReader dtdValidatingRe ader = XmlReader.Creat e(xmlFile, settings);
settings.Valida tionType = ValidationType. Schema;
XmlReader xsdValidatingRe ader = XmlReader.Creat e(dtdValidating Reader,
settings);
while(xsdValida tingReader.Read ()) { }
Thanks,
Priya
"jhowey" <jo****@gmail.c om> wrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Is there a way i can override the class so I can reverse it (ie; look
for Schema first)?
Zafar Abbas wrote: Validation can not perform DTD and XSD validation at the same time. If
you
have ValidationType set to Auto, and have a DTD declaraion, you will only
get DTD validation. It will not look for the XSD schema file.
Zafar
"jhowey" <jo****@gmail.c om> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. . > Hi,
>
> I would like my default ValidationType to be Auto.
>
> Now let's say I have both a DTD and an XSD file for this XML file being
> validated. While it's ValidationType. Auto, it will validate the DTD,
> but will not even attempt to read/validate the namespace or even check
> if schema file exists.
>
> I suppose it's a resolver problem; anyone have any insight on how I can
> have it check the schema File while Auto (without setting
> ValidationType. Schema)?
>
> .NET 1.1
>