[Mono-bugs] [Bug 44831][Min] New - Wrong behaviour of XmlTextWriter.WriteWhitespace()
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Sun, 15 Jun 2003 07:37:14 -0400 (EDT)
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 primey@gmx.net.
http://bugzilla.ximian.com/show_bug.cgi?id=44831
--- shadow/44831 Sun Jun 15 07:37:13 2003
+++ shadow/44831.tmp.31037 Sun Jun 15 07:37:13 2003
@@ -0,0 +1,72 @@
+Bug#: 44831
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: primey@gmx.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Wrong behaviour of XmlTextWriter.WriteWhitespace()
+
+Description of Problem:
+
+The WriteWhitespace() method of the XmlTextWriter class adds
+the whitespaces on the wrong position.
+
+Steps to reproduce the problem:
+
+using System;
+using System.IO;
+using System.Xml;
+using System.Text;
+
+public class XmlWriterTest
+{
+ public static void Main(string[] args)
+ {
+ Stream s = File.Open(args[0], FileMode.Create,
+ FileAccess.Write, FileShare.None);
+ XmlTextWriter writer = new XmlTextWriter(s, Encoding.ASCII)
+;
+ writer.WriteStartElement("a");
+ writer.WriteWhitespace("\n\t");
+ writer.WriteStartElement("b");
+ writer.WriteWhitespace("\n\t");
+ writer.WriteEndElement();
+ writer.WriteWhitespace("\n");
+ writer.WriteEndElement();
+ writer.WriteWhitespace("\n");
+ writer.Close();
+ }
+}
+
+
+Actual Results:
+prime@debian:~/source/XmlWriterTest$ mono xmlwritertest.exe test.xml
+prime@debian:~/source/XmlWriterTest$ cat test.xml
+<a
+ ><b
+ />
+</a>
+
+
+Expected Results:
+D:\Private\Source\XmlWriterTest>xmlwritertest test.xml
+D:\Private\Source\XmlWriterTest>type test.xml
+<a>
+ <b>
+ </b>
+</a>
+
+How often does this happen?
+always
+
+Additional Information: