System.Xml.Schema.XmlSchemaInference.FindElement C# (CSharp) Method

FindElement() private method

private FindElement ( XmlSchemaObjectCollection elements, string elementName ) : XmlSchemaElement
elements XmlSchemaObjectCollection
elementName string
return XmlSchemaElement
            internal XmlSchemaElement FindElement(XmlSchemaObjectCollection elements, string elementName)
            {
                foreach(XmlSchemaObject obj in elements)
                {
                    XmlSchemaElement xse = obj as XmlSchemaElement;
                    if (xse != null && xse.RefName != null)
                    {
                        if (xse.Name == elementName)
                        {
                            return xse;
                        }
                    }
                }
                return null;
            }