private static XmlNode GetAndRemoveBooleanAttributeInternal(XmlNode node, string attrib, bool fRequired, ref bool val) {
XmlNode a = GetAndRemoveAttribute(node, attrib, fRequired);
if (a != null) {
try {
val = bool.Parse(a.Value);
}
catch (Exception e) {
throw new ConfigurationErrorsException(
SR.GetString(SR.GetString(SR.Config_invalid_boolean_attribute, a.Name)),
e, a);
}
}
return a;
}