[Mono-bugs] [Bug 79268][Nor] New - XmlReader unexpected Exception thrown when reading attributes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 4 01:41:33 EDT 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 abyss at pathcom.com.

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

--- shadow/79268	2006-09-04 01:41:33.000000000 -0400
+++ shadow/79268.tmp.23607	2006-09-04 01:41:33.000000000 -0400
@@ -0,0 +1,80 @@
+Bug#: 79268
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: abyss at pathcom.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlReader unexpected Exception thrown when reading attributes
+
+Description of Problem:
+
+When reading an XML file using XmlReader, Element Attribute values read
+using ReadContentAsString() causes an exception where Microsoft .NET 2.0
+does not (using gmcs).
+
+
+Steps to reproduce the problem:
+1. Attached is sample code (if I can figure out how to attach a .gz)
+2. Follow the steps below to compile and execute under Linux.
+3. Compare results with steps below for Windows XP and .NET 2.0.
+
+Actual Results:
+-----------------------
+cc at cczip:~/temp/TestXmlReader$ ls -l
+total 8
+-rwxr--r-- 1 cc cc  82 Sep  3 23:22 MyData.xml
+-rwxr--r-- 1 cc cc 418 Sep  3 23:53 Program.cs
+cc at cczip:~/temp/TestXmlReader$ gmcs --version
+Mono C# compiler version 1.1.13.8
+cc at cczip:~/temp/TestXmlReader$ gmcs Program.cs
+cc at cczip:~/temp/TestXmlReader$ mono Program.exe
+
+Unhandled Exception: System.Xml.XmlException: Child element is not expected
+in this operation. file:///home/cc/temp/TestXmlReader/MyData.xml Line 3,
+position 3.in <0x0007f> System.Xml.XmlReader:ReadContentString ()
+in <0x0000a> System.Xml.XmlReader:ReadContentAsString ()
+in <0x0007d> TestXmlReader.Program:Main (System.String[] args)
+cc at cczip:~/temp/TestXmlReader$
+-----------------------
+
+Expected Results:
+
+These results are from Windows XP using Visual Studio 2005:
+-----------------------
+C:\Temp\TestXmlReader>csc program.cs
+Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
+for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
+Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
+
+
+C:\Temp\TestXmlReader>program
+root id = myId
+
+C:\Temp\TestXmlReader>
+-----------------------
+
+
+How often does this happen? 
+
+Always.
+
+
+Additional Information:
+
+Standard mono packages installed using apt-get from Debian repository.
+All mono packages are version 1.1.13.8-1
+
+The XML file was created under Windows, so I don't know if end-of-line
+characters are a factor.  They shouldn't be.
+
+Requires gmcs to compile correctly.


More information about the mono-bugs mailing list