By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,994 Members | 1,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,994 IT Pros & Developers. It's quick & easy.

XmlSerializer.Deserialize() and XmlSchemaValidator

P: n/a
In an application which uses an XML file, I wish to use XmlSchemaValidator
class to validate this file against the XSD file..

In the example of msdn, ( )
, before initialising the XmlSchemaValidator, XmlSerializer is initialised.

I saw that if there is a node or attribute which is not valid (to xml
schema), the method XmlSerializer.Deserialize() launches an exception. It
means that before validating this file ( or stream ) its already controlled
by Deserialize method.

I wish to know what is the need to Validate this file against
XmlSchemValidator, if its already controlled ? Will it be efficient, if I
skip this Validation ? If not, why ?

Thanks in advance for the comments

Mar 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.