[Mono-bugs] [Bug 469324] New: XmlReader.ReadContentAsString throws InvalidOperationException when element is empty

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 26 08:57:49 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=469324


           Summary: XmlReader.ReadContentAsString throws
                    InvalidOperationException when element is empty
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: x86
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: cproch at seculogix.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=267614)
 --> (https://bugzilla.novell.com/attachment.cgi?id=267614)
Test program to reproduce the exception.

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5)
Gecko/2008121300 SUSE/3.0.5-1.1 Firefox/3.0.5

The method XmlReader.ReadContentAsString() throws

System.InvalidOperationException: Node type EndElement is not supported in this
operation.  (line 1, column 9)

when the element is empty.
To be consistent with MS.NET, it should return an empty string.



Reproducible: Always

Steps to Reproduce:
Compile and run the attached test program.

Actual Results:  
Throws System.InvalidOperationException.

Expected Results:  
Should return an empty string, like MS.NET does.

-- 
Configure bugmail: https://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