https://bugzilla.novell.com/show_bug.cgi?id=398592
Summary: Appending an attribute twice throws runtime error Product: Mono: Class Libraries Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Sys.XML AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: mono-bugs@lists.ximian.com Found By: --- Using this testcase: using System; using System.Text; using System.Xml; namespace bug { public class Test { static void Main(string[] args) { XmlDocument doc = new XmlDocument(); XmlElement root = doc.CreateElement("root"); doc.AppendChild(root); XmlElement child1 = doc.CreateElement("child1"); XmlAttribute attr = doc.CreateAttribute("name"); attr.Value = "value"; root.AppendChild(child1); child1.Attributes.Append(attr); XmlElement child2 = doc.CreateElement("child2"); root.AppendChild(child2); child2.Attributes.Append(attr); doc.WriteTo(new XmlTextWriter(Console.Out)); } } } Mono gives this result: [EMAIL PROTECTED]:~$ ~/mono-trunk/bin/mono xml-attribute-bug.exe Unhandled Exception: System.ArgumentException: This attribute is already set to another element. at System.Xml.XmlAttributeCollection.SetNamedItem (System.Xml.XmlNode node) [0x00000] at System.Xml.XmlAttributeCollection.Append (System.Xml.XmlAttribute node) [0x00000] at bug.Test.Main (System.String[] args) [0x00000] MS Runtime: C:\Program Files\Microsoft Visual Studio 8\VC>xml-attribute-bug.exe <root><child1 /><child2 name="value" /></root> -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs