diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/RestXmlWriter.cs | 16 |
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 | } |