[Mono-bugs] [Bug 48012][Nor] New - XmlTextReader fails to parse valid XML

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 28 Aug 2003 18:21:52 -0400 (EDT)


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 alp@atoker.com.

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

--- shadow/48012	2003-08-28 18:21:52.000000000 -0400
+++ shadow/48012.tmp.14685	2003-08-28 18:21:52.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 48012
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: alp@atoker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlTextReader fails to parse valid XML
+
+xmllint validates the XML but the parser chokes on it.
+Problem seems to be with the DOCTYPE element.
+
+bug.cs and bug.xml are attached.
+
+The problem:
+
+[alp@star html]$ xmllint bug.xml
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+"http://www.w3.org/TR/REC-html40/loose.dtd">
+<html/>
+[alp@star html]$ ./bug.exe
+XmlDeclaration
+Whitespace
+ 
+Unhandled Exception: System.Xml.XmlException: expected '>' (3E) but found
+'-' (2D) Line 31, position 4.
+in <0x0013a> 00 System.Xml.XmlTextReader:Expect (int)
+in <0x00460> 00 System.Xml.XmlTextReader:ReadParameterEntityDecl ()
+in <0x0020e> 00 System.Xml.XmlTextReader:CompileDeclaration ()
+in <0x00237> 00 System.Xml.XmlTextReader:CompileDTDSubset ()
+in <0x002ac> 00 System.Xml.XmlTextReader:GenerateDTDObjectModel
+(string,string,string,string,int,int)
+in <0x00356> 00 System.Xml.XmlTextReader:ReadDoctypeDecl ()
+in <0x000bf> 00 System.Xml.XmlTextReader:ReadDeclaration ()
+in <0x0008e> 00 System.Xml.XmlTextReader:ReadTag ()
+in <0x000ef> 00 System.Xml.XmlTextReader:ReadContent ()
+in <0x00061> 00 System.Xml.XmlTextReader:Read ()
+in <0x0006f> 00 .xmlbug:Main ()