Update of /cvsroot/mvp-xml/Common/v1/src/XPath
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1981/v1/src/XPath
Modified Files:
XPathNavigatorReader.cs
Log Message:
Fixed bug for PIs.
Index: XPathNavigatorReader.cs
===================================================================
RCS file: /cvsroot/mvp-xml/Common/v1/src/XPath/XPathNavigatorReader.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- XPathNavigatorReader.cs 17 Nov 2004 15:18:10 -0000 1.5
+++ XPathNavigatorReader.cs 18 Dec 2004 04:47:22 -0000 1.6
@@ -674,12 +674,22 @@
}
else
{
- // Otherwise, move to the parent and set as the
- // end element of it (we already read all children therefore).
- _navigator.MoveToParent();
- _depth--;
- _isendelement = true;
- return true;
+ if (_depth == 0)
+ {
+ // We reached the end of the fragment/content.
+ _eof = true;
+ _state = ReadState.EndOfFile;
+ return false;
+ }
+ else
+ {
+ // Otherwise, move to the parent and set as the
+ // end element of it (we already read all children therefore).
+ _navigator.MoveToParent();
+ _depth--;
+ _isendelement = true;
+ return true;
+ }
}
}
}
|