* XDocument.cs : fix wrong indentation handling.
svn path=/trunk/mcs/; revision=123850
+2009-01-20 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XDocument.cs : fix wrong indentation handling.
+
2008-11-19 Jb Evain <jbevain@novell.com>
* XNodeReader: build on NET_2_1.
public void Save (TextWriter tw, SaveOptions options)
{
XmlWriterSettings s = new XmlWriterSettings ();
- if ((options & SaveOptions.DisableFormatting) == 0) {
- // hacky!
+ if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
- s.IndentChars = String.Empty;
- s.NewLineChars = String.Empty;
- }
- using (XmlWriter w = XmlWriter.Create (tw)) {
+ using (XmlWriter w = XmlWriter.Create (tw, s)) {
Save (w);
}
}