System.Security.SecurityDocument.GetAttributeForElement C# (CSharp) Method

GetAttributeForElement() public method

public GetAttributeForElement ( int position, String attributeName ) : String
position int
attributeName String
return String
        public String GetAttributeForElement( int position, String attributeName )
        {
            if (m_data.Length <= position)
                throw new XmlSyntaxException();

            if (m_data[position++] != c_element)
                throw new XmlSyntaxException();

            String strRetValue = null;
            // This is to move past the tag string.
            GetString( ref position, false );
            

            while (m_data[position] == c_attribute)
            {
                position++;
                String strName = GetString( ref position );
                String strValue = GetString( ref position );

                if (String.Equals( strName, attributeName ))
                {
                    strRetValue = strValue;
                    break;
                }
            }


            return strRetValue;
        }
    }

Usage Example

 String ISecurityElementFactory.Attribute(String attributeName)
 {
     return(m_document.GetAttributeForElement(m_position, attributeName));
 }
All Usage Examples Of System.Security.SecurityDocument::GetAttributeForElement