[Mono-bugs] [Bug 554845] New: XmlWriter is failing for WriteAttributeString when using navigator.AppendChild

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 12 05:01:47 EST 2009


           Summary: XmlWriter is failing for WriteAttributeString when
                    using navigator.AppendChild
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: avkekem at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.1
(KHTML, like Gecko) Chrome/ Safari/532.1

The following scenario works on ms.net, while mono is giving an exception:
        public static void Main (string[] args)
            XmlDocument x = new XmlDocument ();
            XmlElement y = x.CreateElement ("test");
            using (XmlWriter w = y.CreateNavigator ().AppendChild ())
                w.WriteAttributeString ("test", "test1");

Unhandled Exception: System.InvalidOperationException: Current state is not
inside attribute. Cannot close attribute.
  at Mono.Xml.XPath.XmlDocumentInsertionWriter.WriteEndAttribute () [0x00000] 
  at System.Xml.XmlWriter.WriteAttributeString (System.String prefix,
System.String localName, System.String ns, System.String value) [0x00000] 
  at System.Xml.XmlWriter.WriteAttributeString (System.String localName,
System.String value) [0x00000] 
  at test.MainClass.Main (System.String[] args) [0x0001e] in

Reproducible: Always

Steps to Reproduce:

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