From: Atsushi Eno Date: Thu, 19 May 2011 04:15:46 +0000 (+0900) Subject: Allow DocumentType in ImportNode(). X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=106e52d9eca214f6c48d44235ce06e4c13af5ae7;p=mono.git Allow DocumentType in ImportNode(). http://lists.ximian.com/pipermail/mono-devel-list/2011-May/037575.html --- diff --git a/mcs/class/System.XML/System.Xml/XmlDocument.cs b/mcs/class/System.XML/System.Xml/XmlDocument.cs index 3378021cd6d..6a9627da2b0 100644 --- a/mcs/class/System.XML/System.Xml/XmlDocument.cs +++ b/mcs/class/System.XML/System.Xml/XmlDocument.cs @@ -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;