aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs
diff options
context:
space:
mode:
authorDr Scofield2009-05-18 09:34:30 +0000
committerDr Scofield2009-05-18 09:34:30 +0000
commit2ad8710e190b7543989cdb96a5268d21d2b5cefb (patch)
tree1ebf5e7463f04201459ff2fcd8f81b32a23d6ab2 /OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs
parentThank you kindly, StrawberryFride, for a patch that: (diff)
downloadopensim-SC_OLD-2ad8710e190b7543989cdb96a5268d21d2b5cefb.zip
opensim-SC_OLD-2ad8710e190b7543989cdb96a5268d21d2b5cefb.tar.gz
opensim-SC_OLD-2ad8710e190b7543989cdb96a5268d21d2b5cefb.tar.bz2
opensim-SC_OLD-2ad8710e190b7543989cdb96a5268d21d2b5cefb.tar.xz
fixing XmlWriter problem
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs b/OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs
index da37647..9a1047c 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs
@@ -33,6 +33,14 @@ namespace OpenSim.ApplicationPlugins.Rest
33{ 33{
34 public class RestXmlWriter: XmlTextWriter 34 public class RestXmlWriter: XmlTextWriter
35 { 35 {
36 private StringWriter m_sw = null;
37
38 public RestXmlWriter(StringWriter sw) : base(sw)
39 {
40 m_sw = sw;
41 Formatting = Formatting.Indented;
42 }
43
36 public RestXmlWriter(TextWriter textWriter) : base(textWriter) 44 public RestXmlWriter(TextWriter textWriter) : base(textWriter)
37 { 45 {
38 } 46 }
@@ -52,5 +60,13 @@ namespace OpenSim.ApplicationPlugins.Rest
52 public override void WriteStartDocument(bool standalone) 60 public override void WriteStartDocument(bool standalone)
53 { 61 {
54 } 62 }
63
64 public override string ToString()
65 {
66 WriteEndElement();
67 Flush();
68 Close();
69 return m_sw.ToString();
70 }
55 } 71 }
56} 72}