Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

2005-12-14 Atsushi Enomoto <atsushi@ximian.com>

	* XmlNode.cs : under 2.0 xml/xmlns are treated as special cases in
	  GetNamespaceOfPrefix()/GetPrefixOfNamespace() (but it still does not
	  implement IXmlNamespaceResolver, bummer).


svn path=/trunk/mcs/; revision=54352
  • Loading branch information...
commit 5392ed3dbb3fa737b91318b549a3635e408c7562 1 parent 36b7985
@atsushieno atsushieno authored
View
6 mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,5 +1,11 @@
2005-12-14 Atsushi Enomoto <atsushi@ximian.com>
+ * XmlNode.cs : under 2.0 xml/xmlns are treated as special cases in
+ GetNamespaceOfPrefix()/GetPrefixOfNamespace() (but it still does not
+ implement IXmlNamespaceResolver, bummer).
+
+2005-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
* XmlDocument.cs : changed some exception types.
* XmlDocumentNavigator.cs : added 2.0 SchemaInfo.
View
17 mcs/class/System.XML/System.Xml/XmlNode.cs
@@ -347,8 +347,14 @@ public IEnumerator GetEnumerator ()
public virtual string GetNamespaceOfPrefix (string prefix)
{
- if (prefix == null)
+ switch (prefix) {
+ case null:
throw new ArgumentNullException ("prefix");
+ case "xml":
+ return XmlNamespaceManager.XmlnsXml;
+ case "xmlns":
+ return XmlNamespaceManager.XmlnsXmlns;
+ }
XmlNode node;
switch (NodeType) {
@@ -384,6 +390,15 @@ public virtual string GetNamespaceOfPrefix (string prefix)
public virtual string GetPrefixOfNamespace (string namespaceURI)
{
+#if NET_2_0
+ switch (namespaceURI) {
+ case XmlNamespaceManager.XmlnsXml:
+ return XmlNamespaceManager.PrefixXml;
+ case XmlNamespaceManager.XmlnsXmlns:
+ return XmlNamespaceManager.PrefixXmlns;
+ }
+#endif
+
XmlNode node;
switch (NodeType) {
case XmlNodeType.Attribute:
Please sign in to comment.
Something went wrong with that request. Please try again.