BExIS.Xml.Helpers.XmlSchemaUtility.GetAllSimpleTypes C# (CSharp) Method

GetAllSimpleTypes() public static method

Get all simple types from the schema.
public static GetAllSimpleTypes ( XmlSchema schema ) : List
schema System.Xml.Schema.XmlSchema
return List
        public static List<XmlSchemaSimpleType> GetAllSimpleTypes(XmlSchema schema)
        {
            List<XmlSchemaSimpleType> simpleTypes = new List<XmlSchemaSimpleType>();

            foreach (XmlSchemaObject item in schema.Items)
            {
                if (item is XmlSchemaSimpleType) simpleTypes.Add((XmlSchemaSimpleType)item);
            }

            return simpleTypes;
        }