2007-01-12 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.Security / System.Security.Cryptography.Xml / DataObject.cs
index a21acd42932539bf93122751661cbe682ff7a5ec..d50ac992e4df38e097b909858ce0174d88ccb0da 100644 (file)
@@ -88,7 +88,8 @@ namespace System.Security.Cryptography.Xml {
                                XmlDocument doc = new XmlDocument ();
                                XmlElement el = (XmlElement) doc.ImportNode (element, true);
                                doc.AppendChild (el); // FIXME: it should not be appended
-                               el.RemoveAll ();
+                               while (el.LastChild != null)
+                                       el.RemoveChild (el.LastChild);
                                foreach (XmlNode n in value)
                                        el.AppendChild (doc.ImportNode (n, true));
                                element = el;
@@ -131,7 +132,6 @@ namespace System.Security.Cryptography.Xml {
                        else {
                                XmlDocument document = new XmlDocument ();
                                XmlElement el = document.ImportNode (element, true) as XmlElement;
-                               el.Attributes.RemoveAll ();
                                document.AppendChild (el); // FIXME: it should not be appended
                                el.SetAttribute (attribute, value);
                                element = el;