System.Xml.XmlElement.RemoveAttributeNode C# (CSharp) Méthode

RemoveAttributeNode() public méthode

public RemoveAttributeNode ( XmlAttribute oldAttr ) : XmlAttribute
oldAttr XmlAttribute
Résultat XmlAttribute
        public XmlAttribute RemoveAttributeNode(XmlAttribute oldAttr)
        {
            return default(XmlAttribute);
        }

Usage Example

        private void Munge(XmlElement el)
        {
            XmlAttribute cond = GetConditional(el);
            if (cond != null)
            {
                if (!new XppParser(cond.Value).Evaluate(this))
                {
                    el.ParentNode.RemoveChild(el);
                    return;
                }
                else
                {
                    el.RemoveAttributeNode(cond);
                }
            }

            XmlNodeList nodes = el.ChildNodes;
            XmlNode[] children = new XmlNode[nodes.Count];
            for (int i = 0; i < children.Length; i++)
                children[i] = nodes[i];

            foreach (XmlNode child in children)
            {
                if (child is XmlElement)
                    Munge((XmlElement)child);
            }
        }
All Usage Examples Of System.Xml.XmlElement::RemoveAttributeNode