diff options
author | lbsa71 | 2007-10-12 19:31:37 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-12 19:31:37 +0000 |
commit | b77bf180799e181836e0cc87a62003c36fcbd740 (patch) | |
tree | d7d2069742cab910e3f83167087bdd4a11790555 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | I broke the build and am reverting until I can get the MainLog call proper. (diff) | |
download | opensim-SC-b77bf180799e181836e0cc87a62003c36fcbd740.zip opensim-SC-b77bf180799e181836e0cc87a62003c36fcbd740.tar.gz opensim-SC-b77bf180799e181836e0cc87a62003c36fcbd740.tar.bz2 opensim-SC-b77bf180799e181836e0cc87a62003c36fcbd740.tar.xz |
* Just extracted a standard ToXml() on SceneObjectGroup
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 45db5f7..1603c52 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -311,8 +311,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | 311 | ||
312 | public string ToXmlString() | 312 | public string ToXmlString() |
313 | { | 313 | { |
314 | StringWriter sw = new StringWriter(); | 314 | using (StringWriter sw = new StringWriter()) |
315 | XmlTextWriter writer = new XmlTextWriter(sw); | 315 | { |
316 | using (XmlTextWriter writer = new XmlTextWriter(sw)) | ||
317 | { | ||
318 | ToXml(writer); | ||
319 | } | ||
320 | |||
321 | return sw.ToString(); | ||
322 | } | ||
323 | } | ||
324 | |||
325 | public void ToXml(XmlTextWriter writer) | ||
326 | { | ||
316 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); | 327 | writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); |
317 | writer.WriteStartElement(String.Empty, "RootPart", String.Empty); | 328 | writer.WriteStartElement(String.Empty, "RootPart", String.Empty); |
318 | m_rootPart.ToXml(writer); | 329 | m_rootPart.ToXml(writer); |
@@ -329,8 +340,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
329 | } | 340 | } |
330 | writer.WriteEndElement(); | 341 | writer.WriteEndElement(); |
331 | writer.WriteEndElement(); | 342 | writer.WriteEndElement(); |
332 | writer.Close(); | ||
333 | return sw.ToString(); | ||
334 | } | 343 | } |
335 | 344 | ||
336 | #region Copying | 345 | #region Copying |