Browse Source

2003-07-06 Atsushi Enomoto <[email protected]>

	* XmlElement.cs : IsEmpty has removed attributes since it incorrectly
	  used RemoveAll().

svn path=/trunk/mcs/; revision=15986
Atsushi Eno 22 years ago
parent
commit
4533c5e1ff

+ 5 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2003-07-06  Atsushi Enomoto <[email protected]>
+
+	* XmlElement.cs : IsEmpty has removed attributes since it incorrectly
+	  used RemoveAll().
+
 2003-07-06  Atsushi Enomoto <[email protected]>
 
 	* XmlDocument.cs : Load(string filename) should close its stream.

+ 4 - 2
mcs/class/System.XML/System.Xml/XmlElement.cs

@@ -109,8 +109,10 @@ namespace System.Xml
 
 			set {
 				isNotEmpty = !value;
-				if(value)
-					RemoveAll();
+				if(value) {
+					while (FirstChild != null)
+						RemoveChild (FirstChild);
+				}
 			}
 		}