private bool GetAttributeAsBool(string name, bool defaultValue = false)
{
string value = GetAttribute(name);
bool b;
if (string.IsNullOrEmpty(value) || !bool.TryParse(value, out b))
b = defaultValue;
return b;
}
private int GetAttributeAsInt(string name, int defaultValue = -1)