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


           Summary: Appending same XmlAttribute to XmlNode twice throws
                    Exception .NET difference
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Created an attachment (id=286526)
 --> (http://bugzilla.novell.com/attachment.cgi?id=286526)
Sample code showing problem calling Append twice with same attribute on xmlNode

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8)
Gecko/2009032711 Ubuntu/8.04 (hardy) Firefox/3.0.8

The following can't be done on .NET 

given: XmlNode n;
and: XmlAttribute a;

n.Attributes.Append(a)
n.Attributes.Append(a)


Reproducible: Always

Steps to Reproduce:
1. Compile and Run Sample Code
2.
3.
Actual Results:  
Unhandled Exception: System.ArgumentException: This attribute is already set to
another element.
  at System.Xml.XmlAttributeCollection.SetNamedItem (System.Xml.XmlNode node)
[0x00098] in
/home/hindlet/src/monosvn/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs:270
 
  at System.Xml.XmlAttributeCollection.Append (System.Xml.XmlAttribute node)
[0x00000] in
/home/hindlet/src/monosvn/mcs/class/System.XML/System.Xml/XmlAttributeCollection.cs:107
 



Expected Results:  
Test Program should run without throwing exception

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to