src/Misc/EFTools/XmlCore/Model/Validation/AttributeContentValidator.cs
/// <summary>
///     Returns the XmlSchemaElement with name qname from the given collection
/// </summary>
/// <param name="schemaObjects"></param>
/// <param name="qname"></param>
/// <returns></returns>
Returns the XmlSchemaElement with name qname from the given collection
Returns the XmlSchemaElement with name qname from the given collection
private static XmlSchemaElement GetXmlSchemaElement(XmlSchemaObjectCollection schemaObjects, XmlQualifiedName qname)
        {
            XmlSchemaElement xeelement = null;
            foreach (var xo in schemaObjects)
            {
                var xe = xo as XmlSchemaElement;
                var xs = xo as XmlSchemaSequence;
                if (xe != null)
                {
                    if (xe.QualifiedName.Equals(qname))
                    {
                        xeelement = xe;
                    }
                }
                else if (xs != null)
                {
                    xeelement = GetXmlSchemaElement(xs.Items, qname);
                }
                if (xeelement != null)
                {
                    break;
                }
            }
            return xeelement;
        }
private static XmlSchemaElement GetXmlSchemaElement ( XmlSchemaObjectCollection schemaObjects , XmlQualifiedName qname ) { XmlSchemaElement xeelement = null ; foreach ( var xo in schemaObjects ) { var xe = xo as XmlSchemaElement ; var xs = xo as XmlSchemaSequence ; if ( xe != null ) { if ( xe . QualifiedName . Equals ( qname ) ) { xeelement = xe ; } } else if ( xs != null ) { xeelement = GetXmlSchemaElement ( xs . Items , qname ) ; } if ( xeelement != null ) { break ; } } return xeelement ; }
Returns the XmlSchemaElement with name qname from the given collection
Returns the XmlSchemaElement with name qname from the given collection
None
schemaObjects
XmlSchemaObjectCollection
None
qname
XmlQualifiedName
None