[Mono-bugs] [Bug 36672][Nor] New - XPathNavigator doesn't work with <?xml version..> -element

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Mon, 13 Jan 2003 16:11:34 -0500 (EST)


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 vi64pa@koti.soon.fi.

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

--- shadow/36672	Mon Jan 13 16:11:34 2003
+++ shadow/36672.tmp.2873	Mon Jan 13 16:11:34 2003
@@ -0,0 +1,66 @@
+Bug#: 36672
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vi64pa@koti.soon.fi               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XPathNavigator doesn't work with <?xml version..> -element
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+XPathNavigator with XmlDocument gives weird results:
+
+
+Steps to reproduce the problem:
+
+Run following:
+
+
+using System;
+using System.Xml;
+using System.Xml.XPath;
+
+namespace mcsbugtest {
+
+        public class BugTest
+	{
+	        public static void Main ()
+		{
+			XmlDocument Document = new XmlDocument ();
+			Document.LoadXml ("<?xml version=\"1.0\"
+standalone=\"yes\"?>\"<Root><foo>bar</foo></Root>");
+			XPathNavigator Nav = Document.CreateNavigator ();
+
+			Nav.MoveToRoot ();
+			Nav.MoveToFirstChild ();
+			Console.WriteLine (Nav.NodeType);
+		}
+	}
+}
+
+
+Actual Results:
+
+-1
+
+Expected Results:
+
+Element
+
+How often does this happen? 
+
+Allways.
+
+This happens only when xmldocument have <?xml... element.