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:
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlNode.cs')
-rw-r--r--mcs/class/System.XML/System.Xml/XmlNode.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlNode.cs b/mcs/class/System.XML/System.Xml/XmlNode.cs
index 52c6b21c794..ef1ec861a31 100644
--- a/mcs/class/System.XML/System.Xml/XmlNode.cs
+++ b/mcs/class/System.XML/System.Xml/XmlNode.cs
@@ -71,7 +71,7 @@ namespace System.Xml
get {
// Isn't it conformant to W3C XML Base Recommendation?
// As far as I tested, there are not...
- return (ParentNode != null) ? ParentNode.BaseURI : OwnerDocument.BaseURI;
+ return (ParentNode != null) ? ParentNode.BaseURI : String.Empty;
}
}
@@ -524,7 +524,7 @@ namespace System.Xml
throw new ArgumentException ("The reference node is not a child of this node.");
}
- if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement))
+ if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement) && newChild != ownerDoc.DocumentElement)
throw new XmlException ("multiple document element not allowed.");
// checking validity finished. then appending...