ATMLSchemaLibrary.managers.SchemaManager.GetAttributes C# (CSharp) Method

GetAttributes() public static method

public static GetAttributes ( XmlSchemaComplexType complexType ) : List
complexType System.Xml.Schema.XmlSchemaComplexType
return List
        public static List<XmlSchemaAttribute> GetAttributes( XmlSchemaComplexType complexType )
        {
            var attributes = new List<XmlSchemaAttribute>();
            if (complexType != null && complexType.ContentModel != null)
            {
                var items = new Dictionary<string, XmlSchemaObject>();
                ExtractContentItems( complexType.ContentModel, items );
                foreach (XmlSchemaObject item in items.Values)
                {
                    var attribute = item as XmlSchemaAttribute;
                    if (attribute != null)
                        attributes.Add( attribute );
                }
            }
            return attributes;
        }

Same methods

SchemaManager::GetAttributes ( XmlSchemaElement element ) : List