Update of /cvsroot/mvp-xml/Common/v1/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22700/v1/src
Modified Files:
Common.csproj XmlNodeListFactory.cs changelog.txt
Log Message:
Bug fix in XmlNodeListFactory. Thanks to Raneses, Jason.
Bug fixes in XPathNavigatorReader (thanks Oleg!)
Index: XmlNodeListFactory.cs
===================================================================
RCS file: /cvsroot/mvp-xml/Common/v1/src/XmlNodeListFactory.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- XmlNodeListFactory.cs 27 Sep 2004 16:27:12 -0000 1.1
+++ XmlNodeListFactory.cs 14 Nov 2004 01:24:29 -0000 1.2
@@ -76,7 +76,9 @@
{
if (index >= _nodes.Count)
ReadTo(index);
-
+ // Compatible behavior with .NET
+ if (index >= _nodes.Count || index < 0)
+ return null;
return (XmlNode) _nodes[index];
}
}
@@ -129,6 +131,14 @@
get { return _done; }
} bool _done;
+ /// <summary>
+ /// Current count of nodes in the iterator (read so far).
+ /// </summary>
+ private int CurrentPosition
+ {
+ get { return _nodes.Count; }
+ }
+
#region XmlNodeListEnumerator
private class XmlNodeListEnumerator: IEnumerator
@@ -156,7 +166,7 @@
// If we reached the end and our index is still
// bigger, there're no more items.
- if (_iterator.Done && _position >= _position)
+ if (_iterator.Done && _position >= _iterator.CurrentPosition)
return false;
return true;
Index: changelog.txt
===================================================================
RCS file: /cvsroot/mvp-xml/Common/v1/src/changelog.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- changelog.txt 27 Sep 2004 16:27:12 -0000 1.1
+++ changelog.txt 14 Nov 2004 01:24:29 -0000 1.2
@@ -1,3 +1,16 @@
+November 13, 2004
+
+Bug fix in XmlNodeListFactory. Thanks to Raneses, Jason.
+Bug fixes in XPathNavigatorReader (thanks Oleg!)
+
+---------------------------------------------------------
+
+October 8, 2004
+
+Bug fix in XPathCache that caused NullReferenceExceptions if an XmlNamespaceManager is not used when selecting nodes.
+
+---------------------------------------------------------
+
June 30, 2004
Added XPathNavigatorIterator
Index: Common.csproj
===================================================================
RCS file: /cvsroot/mvp-xml/Common/v1/src/Common.csproj,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Common.csproj 8 Nov 2004 15:18:58 -0000 1.5
+++ Common.csproj 14 Nov 2004 01:24:29 -0000 1.6
@@ -158,11 +158,6 @@
BuildAction = "Compile"
/>
<File
- RelPath = "XPath\IHasXPathNavigator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
RelPath = "XPath\IndexingXPathNavigator.cs"
SubType = "Code"
BuildAction = "Compile"
|