[Mono-bugs] [Bug 77927][Wis] New - XmlTextReader: ReadOuterXml leaves reader at wrong position

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Mar 26 17:22:05 EST 2006


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 rodolfo.campero at gmail.com.

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

--- shadow/77927	2006-03-26 17:22:05.000000000 -0500
+++ shadow/77927.tmp.27038	2006-03-26 17:22:05.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 77927
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: Linux 2.6.12-1-k7 #1 i686 GNU/Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: rodolfo.campero at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlTextReader: ReadOuterXml leaves reader at wrong position
+
+Description of Problem:
+The methods ReadInnerXml and ReadOuterXml leave the reader positioned at a
+position away from the next sibling instead of leaving just at the
+beginning of the next sibling, when using XmlTextReader.
+
+Steps to reproduce the problem:
+1. Build and run the attached program file, with:
+mcs -t:exe -out:testxmlreader.exe TestXmlReader.cs
+mono testxmlreader.exe
+
+Actual Results:
+FAILED
+
+Expected Results:
+OK
+
+How often does this happen? 
+Always
+
+Files (I'will attach also them):
+
+
+8<------------------------------ TestXmlReader.cs
+using System;
+using System.Xml;
+
+class TestClass
+{
+        static void Main(string[] args)
+        {
+                XmlReader reader = new XmlTextReader("testreader.xml");
+                while(reader.LocalName != "element") reader.Read();
+                //Console.WriteLine(reader.ReadOuterXml());
+                bool ok = reader.LocalName == "element" &&
+reader.GetAttribute("order") == "2";
+                Console.WriteLine( ok ? "OK" : "FAILED" );
+        }
+}
+
+8<------------------------------ testreader.xml
+<test>
+        <element order="1"/>
+        <element order="2">
+                <nested/>
+        </element>
+</test>


More information about the mono-bugs mailing list