using System.Xml;
public class XmlParser
{
public static string GetElementAttributeValue(string xmlString, string elementName, string attributeName)
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xmlString);
XmlElement element = xmlDoc.DocumentElement[elementName];
if (element != null)
{
string attributeValue = element.GetAttribute(attributeName);
return attributeValue;
}
return null;
}
}