I have received a number of requests over a period of time asking how to get all the facets defined on simple types or complex types with simple content in an XML Schema. I recently wrote a code sample for the same and I thought i will post it for wider consumption. The code sample will handle restrictions on lists, unions as well as facets defined on base types. public static void GetSchemaTypeFacets(XmlSchemaType schemaType) { if (schemaType == null || schemaType.Datatype == null) { //Complex type
Read More...