[Mono-bugs] [Bug 35308][Nor] New - System.Xml.XmlDocument.OuterXml does not print the xmlns declarations
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
9 Dec 2002 16:20:48 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by pluto@tipic.com.
http://bugzilla.ximian.com/show_bug.cgi?id=35308
--- shadow/35308 Mon Dec 9 11:20:48 2002
+++ shadow/35308.tmp.25605 Mon Dec 9 11:20:48 2002
@@ -0,0 +1,43 @@
+Bug#: 35308
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: pluto@tipic.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Xml.XmlDocument.OuterXml does not print the xmlns declarations
+
+Description of Problem:
+The Xml.XmlDocument.OuterXml property does not actually returns the same
+string as entered (if the xml contains namespaces)
+
+Steps to reproduce the problem:
+
+Xml.XmlDocument tempxml=new Xml.XmlDocument();
+tempxml.LoadXml("<iq type=""get"" id=""ATECLIENT_1""><query
+xmlns=""jabber:iq:auth""><username></username></query></iq>");
+Console.WriteLine("{0}", tempxml.OuterXml);
+
+Actual Results:
+<iq type="get" id="ATECLIENT_1"><query><username /></query></iq>
+
+Expected Results:
+<iq type="get" id="ATECLIENT_1"><query
+xmlns="jabber:iq:auth"><username /></query></iq>
+
+How often does this happen?
+Always
+
+Additional Information:
+The problem seems to be in System.Xml.XmlTextWriter.StartElementInternal.
+The condition for setting the boolean variable addDefaultNamespace is not
+the correct one.