Do not pretty format xml output
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Sun, 29 Jul 2007 13:08:17 +0000 (13:08 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Sun, 29 Jul 2007 13:08:17 +0000 (13:08 -0000)
svn path=/trunk/mcs/; revision=82931

mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs

index 4d9202b7db598045418f3395540506fd444ff650..0e1d4c040c630edef39b441e149972be2a73a9d6 100644 (file)
@@ -36,6 +36,7 @@ using System.Collections;
 using System.Web.Script.Serialization;
 using System.IO;
 using System.Xml.Serialization;
+using System.Xml;
 
 namespace System.Web.Script.Services
 {
@@ -92,8 +93,11 @@ namespace System.Web.Script.Services
 
                                object target = MethodInfo.IsStatic ? null : Activator.CreateInstance (_typeInfo._type);
                                object result = MethodInfo.Invoke (target, pp);
-                               if (_xmlSer != null)
-                                       _xmlSer.Serialize (writer, result);
+                               if (_xmlSer != null) {
+                                       XmlTextWriter xwriter = new XmlTextWriter (writer);
+                                       xwriter.Formatting = Formatting.None;
+                                       _xmlSer.Serialize (xwriter, result);
+                               }
                                else
                                        LogicalTypeInfo.JSSerializer.Serialize (result, writer);
                        }