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

GetAllElements() public static method

Get all elements from the schema.
public static GetAllElements ( XmlSchema schema ) : List
schema System.Xml.Schema.XmlSchema
return List
        public static List<XmlSchemaElement> GetAllElements(XmlSchema schema)
        {
            List<XmlSchemaElement> elements = new List<XmlSchemaElement>();

            foreach (XmlSchemaElement item in schema.Elements.Values)
            {
                if (item is XmlSchemaElement)
                {
                    Debug.WriteLine("                          ");
                    Debug.WriteLine("__________________________");
                    Debug.WriteLine(item.Name);
                    Debug.WriteLine("---------------------------------");
                    //elements.Add((XmlSchemaElement)item);
                    elements = GetElements((XmlSchemaElement)item, elements, true, new List<XmlSchemaElement>());
                }
            }

            return elements;
        }

Same methods

XmlSchemaUtility::GetAllElements ( XmlSchemaObject obj, bool recursive, List allElements ) : List