Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Diamond <injektilo@mono-cvs.ximian.com>2002-08-23 09:09:53 +0400
committerJason Diamond <injektilo@mono-cvs.ximian.com>2002-08-23 09:09:53 +0400
commitd0cd6199a50148579b6755b641fc9c13bba93597 (patch)
treece055e94c94316b04f4c174b2d6eb7b5b77e3120 /mcs/class/System.XML/System.Xml
parentdb0e7930ea0a70dbcb582462fea71978eee2484a (diff)
Implementation and tests for XmlAttributeCollection.RemoveAll and XmlElement.RemoveAllAttributes courtesy of Matt Hunter <xrkune@tconl.com>.
svn path=/trunk/mcs/; revision=6926
Diffstat (limited to 'mcs/class/System.XML/System.Xml')
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs5
-rw-r--r--mcs/class/System.XML/System.Xml/XmlElement.cs3
3 files changed, 9 insertions, 4 deletions
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,5 +1,10 @@
2002-08-22 Jason Diamond <jason@injektilo.org>
+ * XmlAttributeCollection.cs, XmlElement.cs: Implementation of RemoveAll
+ and RemoveAllAttributes courtesy of Matt Hunter <xrkune@tconl.com>.
+
+2002-08-22 Jason Diamond <jason@injektilo.org>
+
* XmlElement.cs: Correction to previous GetElementsByTagName patch
courtesy of Matt Hunter <xrkune@tconl.com>.
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]