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

GetAllAttributes() public static method

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

            foreach (XmlSchemaObject item in schema.Items)
            {
                if (item is XmlSchemaAttribute) attributes.Add((XmlSchemaAttribute)item);
            }

            return attributes;
        }