XML Validation in ASP.NET MVC during load
Posted
by Jamie Nordmeyer
on Stack Overflow
See other posts from Stack Overflow
or by Jamie Nordmeyer
Published on 2010-05-13T03:07:41Z
Indexed on
2010/05/13
3:14 UTC
Read the original article
Hit count: 369
I'm writing an ASP.NET MVC 2 application where one of the backing stores I plan to support is XML. I have a POCO that represents the settings for the site, along with an XML file to contain these settings. My question is what is the best way to validate this data as it is read from disk in to the POCO? I know I can use an XSD, or maybe use the Data Annotations library to mark up the POCO, and use reflection to validate the data, but is there another way, perhaps in .NET 3.5 or MVC to do this? I've spent some time Googling this issue, and want to be sure I'm doing it in the best manner.
Thanks in advance!
© Stack Overflow or respective owner