From d0cd6199a50148579b6755b641fc9c13bba93597 Mon Sep 17 00:00:00 2001 From: Jason Diamond Date: Fri, 23 Aug 2002 05:09:53 +0000 Subject: Implementation and tests for XmlAttributeCollection.RemoveAll and XmlElement.RemoveAllAttributes courtesy of Matt Hunter . svn path=/trunk/mcs/; revision=6926 --- mcs/class/System.XML/System.Xml/ChangeLog | 5 +++++ mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs | 5 +++-- mcs/class/System.XML/System.Xml/XmlElement.cs | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'mcs/class/System.XML/System.Xml') diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog index bb2e2a8ab7d..a44fce96d1b 100644 --- a/mcs/class/System.XML/System.Xml/ChangeLog +++ b/mcs/class/System.XML/System.Xml/ChangeLog @@ -1,3 +1,8 @@ +2002-08-22 Jason Diamond + + * XmlAttributeCollection.cs, XmlElement.cs: Implementation of RemoveAll + and RemoveAllAttributes courtesy of Matt Hunter . + 2002-08-22 Jason Diamond * XmlElement.cs: Correction to previous GetElementsByTagName patch diff --git a/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs b/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs index 203d8d33f15..3c3afbf5385 100644 --- a/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs +++ b/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs @@ -96,10 +96,11 @@ namespace System.Xml throw new NotImplementedException (); } - [MonoTODO] public virtual void RemoveAll () { - throw new NotImplementedException (); + while (this.Count > 0) + base.RemoveNamedItem (this.Item (0).Name); + } [MonoTODO] diff --git a/mcs/class/System.XML/System.Xml/XmlElement.cs b/mcs/class/System.XML/System.Xml/XmlElement.cs index 11802a285ac..5c346024596 100644 --- a/mcs/class/System.XML/System.Xml/XmlElement.cs +++ b/mcs/class/System.XML/System.Xml/XmlElement.cs @@ -217,10 +217,9 @@ namespace System.Xml attributes.RemoveAll (); } - [MonoTODO] public virtual void RemoveAllAttributes () { - throw new NotImplementedException (); + attributes.RemoveAll (); } [MonoTODO] -- cgit v1.2.3