/// <summary> /// Sets whether the attribute whose name is contained in <see cref="XsiNilName"/> is set to /// the string "true" (if <c>true</c>) or omitted entirely (if <c>false</c>). /// </summary> /// <param name="element"></param> /// <param name="newValue"></param> /// <exception cref="NotSupportedException">The given navigable does not support editing.</exception> public static void XsiNil(this IXPathNavigable element, bool newValue) { element.SetAttributeValue(XsiNilName, GetXsiNilValue(newValue)); }
/// <summary> /// Removes an attribute with the specified XName. /// </summary> /// <param name="element"></param> /// <param name="name"></param> /// <exception cref="NotSupportedException">The given navigable does not support editing.</exception> public static void RemoveAttribute(this IXPathNavigable element, XName name) { element.SetAttributeValue(name, null); }