Allow DocumentType in ImportNode().
authorAtsushi Eno <atsushi@ximian.com>
Thu, 19 May 2011 04:15:46 +0000 (13:15 +0900)
committerAtsushi Eno <atsushi@ximian.com>
Thu, 19 May 2011 04:15:46 +0000 (13:15 +0900)
http://lists.ximian.com/pipermail/mono-devel-list/2011-May/037575.html

mcs/class/System.XML/System.Xml/XmlDocument.cs

index 3378021cd6dfc39c2e9ddaa07fdeb86ed0dc0b24..6a9627da2b01927745171e1177a159d2024dcd32 100644 (file)
@@ -638,7 +638,7 @@ namespace System.Xml
                                return df;
 
                        case XmlNodeType.DocumentType:
-                               throw new XmlException ("DocumentType cannot be imported.");
+                               return ((XmlDocumentType) node).CloneNode (deep);
 
                        case XmlNodeType.Element:
                                XmlElement src = (XmlElement)node;