Having a XmlDocument loaded with a XSD schema, how do I get the restrictions for a given node in the document?
I would like to iterate through the document, and automatically correct errors where possible (eg: truncate strings that are too long, remove empty nodes that shouldn't be, etc.)
I am doing this because xsd.exe does not take into account string length restrictions or differentiate between null and empty strings. I'm finding that doing this "post-processing" is simpler than manually trying to ensure these restrictions before serialization.