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:
authorPiers Haken <piers@mono-cvs.ximian.com>2002-07-12 14:52:08 +0400
committerPiers Haken <piers@mono-cvs.ximian.com>2002-07-12 14:52:08 +0400
commitc004fb18995530e4b6d221e0024fc78724b5063b (patch)
tree5e54805899aabde16a80fca5c06610421602e476 /mcs/class/System.XML/System.Xml
parenta8815fd72c9cdd892aa9785662393d5eb4c24925 (diff)
2002-07-12 Piers Haken <piersh@friksit.com>
* XmlAttributeCollection.cs: implement some ItemOf indexers * XmlNamedNodeMap.cs: add internal 'Nodes' accessor for the nodeList field * XmlNode.cs: SelectNodes: return empty XmlNodeList, not null svn path=/trunk/mcs/; revision=5722
Diffstat (limited to 'mcs/class/System.XML/System.Xml')
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog6
-rw-r--r--mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/XmlNamedNodeMap.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlNode.cs5
4 files changed, 11 insertions, 6 deletions
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index 2e1f47bed1b..53c203201a7 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-12 Piers Haken <piersh@friksit.com>
+
+ * XmlAttributeCollection.cs: implement some ItemOf indexers
+ * XmlNamedNodeMap.cs: add internal 'Nodes' accessor for the nodeList field
+ * XmlNode.cs: SelectNodes: return empty XmlNodeList, not null
+
2002-07-06 Ajay kumar Dwivedi <adwiv@yahoo.com>
* XmlTextWriter: Fixed Indentation. IndentationOverridden should
diff --git a/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs b/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs
index 11bef65eaaa..203d8d33f15 100644
--- a/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs
+++ b/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs
@@ -28,7 +28,7 @@ namespace System.Xml
[System.Runtime.CompilerServices.IndexerName ("ItemOf")]
public virtual XmlAttribute this [string name] {
get {
- throw new NotImplementedException ();
+ return (XmlAttribute) GetNamedItem (name);
}
}
@@ -36,7 +36,7 @@ namespace System.Xml
[System.Runtime.CompilerServices.IndexerName ("ItemOf")]
public virtual XmlAttribute this [int i] {
get {
- throw new NotImplementedException ();
+ return (XmlAttribute) Nodes [i];
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlNamedNodeMap.cs b/mcs/class/System.XML/System.Xml/XmlNamedNodeMap.cs
index c605a82cb34..4a92046fd93 100644
--- a/mcs/class/System.XML/System.Xml/XmlNamedNodeMap.cs
+++ b/mcs/class/System.XML/System.Xml/XmlNamedNodeMap.cs
@@ -100,5 +100,7 @@ namespace System.Xml
nodeList.Add (node);
return null;
}
+
+ internal ArrayList Nodes { get { return nodeList; } }
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlNode.cs b/mcs/class/System.XML/System.Xml/XmlNode.cs
index ca9df1ee022..59a5c752aa4 100644
--- a/mcs/class/System.XML/System.Xml/XmlNode.cs
+++ b/mcs/class/System.XML/System.Xml/XmlNode.cs
@@ -336,14 +336,11 @@ namespace System.Xml
if (nsmgr != null)
expr.SetContext (nsmgr);
XPathNodeIterator iter = nav.Select (expr);
- if (!iter.MoveNext ())
- return null;
ArrayList rgNodes = new ArrayList ();
- do
+ while (iter.MoveNext ())
{
rgNodes.Add (((XmlDocumentNavigator) iter.Current).Node);
}
- while (iter.MoveNext ());
return new XmlNodeArrayList (rgNodes);
}