[Mono-bugs] [Bug 520080] New: XmlTextReader has problems with XMl Fragments "XmlException: '?>' is expected"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 8 03:28:01 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=520080


           Summary: XmlTextReader has problems with XMl Fragments
                    "XmlException: '?>' is expected"
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: dna at mono-project.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=303680)
 --> (http://bugzilla.novell.com/attachment.cgi?id=303680)
Testcase

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1)
Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)

Using Mono version 2.5 (/trunk/mono r137138 Tue Jun 30 12:30:12 CEST 2009).

While using CruiseControl.NET i found a problem regarding the XmlTextReader.
CCNet merge xml log from external tools, like gendarme or nunit, into the main
build log using "System.Xml.XmlWriter.WriteNode".

During merge the following exception is thrown:

Exception: System.Xml.XmlException: '?>' is expected
  at Mono.Xml2.XmlTextReader.Expect (System.String expected) [0x00000]
  at Mono.Xml2.XmlTextReader.SkipTextDeclaration () [0x00000]
  at Mono.Xml2.XmlTextReader.Read () [0x00000]
  at System.Xml.XmlTextReader.Read () [0x00000]
  at Mono.Xml.XmlFilterReader.Read () [0x00000]
  at System.Xml.XmlWriter.WriteNode (System.Xml.XmlReader reader, Boolean
defattr) [0x00000]
  at ThoughtWorks.CruiseControl.Core.Util.XmlFragmentWriter.WriteNodeBase
(System.Xml.XmlReader reader, Boolean defattr) [0x00000]
  at ThoughtWorks.CruiseControl.Core.Util.XmlFragmentWriter.WriteNode
(System.Xml.XmlReader reader, Boolean defattr) [0x00000]
  at ThoughtWorks.CruiseControl.Core.Util.XmlFragmentWriter.WriteNode
(System.String xml) [0x00000]

The attached Testcase contains the CCNet methods to merge xml fragments/logs
and shows the problem.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
A exception is thrown and the logs are merged as CDATA.

Expected Results:  
No exception and the logs are merged as xml fragments.

This testcase runs fine on .NET 2.0+

Download and unpack the testcase, switch to the XmlWriterTest/bin/Debug/
directory and run: mono XmlWriterTest.exe

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list