string GetRequiredAttribute(XmlElement element, string attributeName)
{
string value = element.GetAttribute(attributeName);
if (null == value || 0 == value.Length)
{
throw new ApplicationException(string.Format("Expected attribute '{0}' for element '{1}'!", attributeName, element.LocalName));
}
return value;
}