[Mono-bugs] [Bug 54554][Nor] New - XmlTextWriter.WriteFullEndElement() doesn't write the right tag
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 18 Feb 2004 17:30:21 -0500 (EST)
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 jeanmarc.andre@cpe.fr.
http://bugzilla.ximian.com/show_bug.cgi?id=54554
--- shadow/54554 2004-02-18 17:30:21.000000000 -0500
+++ shadow/54554.tmp.28676 2004-02-18 17:30:21.000000000 -0500
@@ -0,0 +1,96 @@
+Bug#: 54554
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details: Fedora Core 1.0
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: jeanmarc.andre@cpe.fr
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: XmlTextWriter.WriteFullEndElement() doesn't write the right tag
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+XmlTextWriter.WriteFullEndElement() doesn't write the right tag in this
+particular case.
+
+Steps to reproduce the problem:
+1. Build and run this:
+
+// XmlTextWriterBug.cs
+
+using System;
+using System.Xml;
+using System.IO;
+
+public class XmlTextWriterBug
+{
+ public static void Main()
+ {
+ MemoryStream stream = new MemoryStream();
+ XmlTextWriter writer = new XmlTextWriter(stream, null);
+ writer.Formatting = Formatting.Indented;
+
+ writer.WriteStartElement(null, "Book", null);
+ writer.WriteStartElement(null, "Author", null);
+ writer.WriteStartElement(null, "Name", null);
+ writer.WriteString("Philip K. Dick");
+ writer.WriteEndElement();
+ writer.WriteStartElement(null, "DateOfBirth", null);
+ writer.WriteString("12 16 1928");
+ writer.WriteEndElement();
+ writer.WriteEndElement();
+ writer.WriteStartElement(null, "Title", null);
+ writer.WriteFullEndElement();
+ writer.WriteEndElement();
+
+ writer.Flush();
+
+ stream.Position = 0;
+ StreamReader r = new StreamReader(stream);
+ Console.WriteLine(r.ReadToEnd());
+ }
+}
+
+2.
+3.
+
+Actual Results:
+Here is the output:
+<Book>
+ <Author>
+ <Name>Philip K. Dick</Name>
+ <DateOfBirth>12 16 1928</DateOfBirth>
+ </Author>
+ <Title>
+ </DateOfBirth>
+</Book>
+
+
+
+Expected Results:
+Should be this:
+<Book>
+ <Author>
+ <Name>Philip K. Dick</Name>
+ <DateOfBirth>12 16 1928</DateOfBirth>
+ </Author>
+ <Title>
+ </Title>
+</Book>
+
+
+
+How often does this happen?
+Always
+
+Additional Information: