System.Xml.XmlAttributeCollection.RemoveParentFromElementIdAttrMap C# (CSharp) Method

RemoveParentFromElementIdAttrMap() private method

private RemoveParentFromElementIdAttrMap ( XmlAttribute attr ) : void
attr XmlAttribute
return void
        internal void RemoveParentFromElementIdAttrMap(XmlAttribute attr)
        {
            XmlElement parentElem = parent as XmlElement;
            if (parentElem != null)
            {
                if (parent.OwnerDocument == null)
                    return;
                XmlName attrname = parent.OwnerDocument.GetIDInfoByElement(parentElem.XmlName);
                if (attrname != null && attrname.Prefix == attr.XmlName.Prefix && attrname.LocalName == attr.XmlName.LocalName) {
                    parent.OwnerDocument.RemoveElementWithId(attr.Value, parentElem); //remove the element from the hashtable
                }
            }
        }