[Mono-bugs] [Bug 81451][Nor] New - inconsistency in the XMLReader

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 25 11:20:10 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mercier.eric at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81451

--- shadow/81451	2007-04-25 11:20:10.000000000 -0400
+++ shadow/81451.tmp.14553	2007-04-25 11:20:10.000000000 -0400
@@ -0,0 +1,67 @@
+Bug#: 81451
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: mercier.eric at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: inconsistency in the XMLReader
+
+Into System.XML.XmlReader, we can found this:
+
+		public virtual bool ReadToNextSibling (string name)
+		{
+			if (ReadState != ReadState.Interactive)
+				return false;
+			int depth = Depth;
+			for (Skip (); depth >= Depth; Skip ())
+				if (NodeType == XmlNodeType.Element && name == Name)
+					return true;
+			return false;
+		}
+
+		public virtual bool ReadToNextSibling (string localName, string namespaceURI)
+		{
+			if (ReadState != ReadState.Interactive)
+				return false;
+			int depth = Depth;
+			for (Skip (); depth >= Depth; Skip ())
+				if (NodeType == XmlNodeType.Element && localName == LocalName &&
+namespaceURI == NamespaceURI)
+					return true;
+			return false;
+		}
+
+I think it sould be this:
+
+		public virtual bool ReadToNextSibling (string name)
+		{
+			if (ReadState != ReadState.Interactive)
+				return false;
+			int depth = Depth;
+			for (Skip (); depth <= Depth; Skip ())
+				if (NodeType == XmlNodeType.Element && name == Name)
+					return true;
+			return false;
+		}
+
+		public virtual bool ReadToNextSibling (string localName, string namespaceURI)
+		{
+			if (ReadState != ReadState.Interactive)
+				return false;
+			int depth = Depth;
+			for (Skip (); depth <= Depth; Skip ())
+				if (NodeType == XmlNodeType.Element && localName == LocalName &&
+namespaceURI == NamespaceURI)
+					return true;
+			return false;
+		}


More information about the mono-bugs mailing list