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;
}
}