Update of /cvsroot/mvp-xml/Common/v1/src/XPath
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15187/v1/src/XPath
Modified Files:
XPathNavigatorReader.cs
Log Message:
Initial fix of XPathNavigatorReader.
Index: XPathNavigatorReader.cs
===================================================================
RCS file: /cvsroot/mvp-xml/Common/v1/src/XPath/XPathNavigatorReader.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- XPathNavigatorReader.cs 18 Dec 2004 04:47:22 -0000 1.6
+++ XPathNavigatorReader.cs 1 Jan 2005 22:38:04 -0000 1.7
@@ -137,7 +137,7 @@
get
{
return _fragment ||
- _navigator.NodeType == XPathNodeType.ProcessingInstruction ||
+ //_navigator.NodeType == XPathNodeType.ProcessingInstruction ||
_navigator.NodeType == XPathNodeType.Comment;
}
}
@@ -637,7 +637,8 @@
{
// If XML fragment is not allowed and we're already at the
// original location, and the were no children, this is an empty root.
- if (!AllowFragment && _navigator.IsEmptyElement)
+ if (!AllowFragment &&
+ (_navigator.IsEmptyElement || _navigator.NodeType != XPathNodeType.Element))
{
_eof = true;
_state = ReadState.EndOfFile;
|