[Mono-bugs] [Bug 59308][Wis] New - XmlDocument does not preserve whitespace if PreserveWhitespace is set after loading

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 29 May 2004 21:02:20 -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 niel@bornstein.atlanta.ga.us.

http://bugzilla.ximian.com/show_bug.cgi?id=59308

--- shadow/59308	2004-05-29 21:02:20.000000000 -0400
+++ shadow/59308.tmp.30956	2004-05-29 21:02:20.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 59308
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: Linux and MacOS
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: niel@bornstein.atlanta.ga.us               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlDocument does not preserve whitespace if PreserveWhitespace is set after loading
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+XmlDocument does not preserve whitespace if PreserveWhitespace property is
+set after loading the document.
+
+Steps to reproduce the problem:
+1. Compile this code:
+using System;
+using System.Xml;
+
+public class Test {
+        public static void Main(string [] args) {
+                XmlDocument doc = new XmlDocument();
+                doc.Load(args[0]);
+                doc.PreserveWhitespace = true;
+                doc.WriteTo(new XmlTextWriter(Console.Out));
+        }
+}
+
+2. Run the test program with any XML document (example uses a .svn/entries
+file)
+
+
+Actual Results:
+<?xml version="1.0" encoding="utf-8"?><wc-entries xmlns="svn:"><entry
+committed-rev="913" name="" committed-date="2004-05-26T11:27:14.840656Z"
+url="http://svn.example.com/svn/repos/monodn" last-author="edmundd"
+kind="dir" uuid="a4976ae6-85be-0310-9460-8218545d24cd" revision="913"
+/><entry name="06-xml" kind="dir" copyfrom-rev="705"
+copyfrom-url="http://svn.example.com/svn/repos/monodn/07-xml" /><entry
+name="03-keyfunc" kind="dir" /><entry committed-rev="450"
+name="ChapterMakefile" text-time="2004-04-09T00:07:18.000000Z"
+committed-date="2004-03-31T14:11:29.253801Z" checksum="0df7399db38cee3
+...
+
+Expected Results:
+<?xml version="1.0" encoding="utf-8"?>
+<wc-entries
+   xmlns="svn:">
+<entry
+   committed-rev="913"
+   name=""
+   committed-date="2004-05-26T11:27:14.840656Z"
+   url="http://svn.example.com/svn/repos/monodn"
+   last-author="edmundd"
+   kind="dir"
+...
+
+How often does this happen? 
+Always
+
+Additional Information:
+This used to work as expected