Update of /cvsroot/mvp-xml/Common/v1/src/XPath
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11638/v1/src/XPath
Modified Files:
XPathNavigatorReader.cs
Log Message:
Fixed bug reported by Oleg that causes wrong behaviror with leaf nodes.
Index: XPathNavigatorReader.cs
===================================================================
RCS file: /cvsroot/mvp-xml/Common/v1/src/XPath/XPathNavigatorReader.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- XPathNavigatorReader.cs 27 Sep 2004 16:27:12 -0000 1.1
+++ XPathNavigatorReader.cs 19 Oct 2004 07:15:11 -0000 1.2
@@ -620,6 +620,14 @@
return _navigator.MoveToFirstChild();
}
+ // If XML fragment is not allowed and we're already at the
+ // original location, set as end element.
+ if (_navigator.IsSamePosition(_original) && !_fragment)
+ {
+ _isendelement = true;
+ return true;
+ }
+
// Otherwise, try to move to sibling.
if (_navigator.MoveToNext())
{
|