aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneXmlLoader.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs19
3 files changed, 21 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index fd2d746..5611b03 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -583,19 +583,6 @@ namespace OpenSim.Region.Framework.Scenes
583 583
584 #endregion 584 #endregion
585 585
586 public string ToXmlString2()
587 {
588 using (StringWriter sw = new StringWriter())
589 {
590 using (XmlTextWriter writer = new XmlTextWriter(sw))
591 {
592 ToXml2(writer);
593 }
594
595 return sw.ToString();
596 }
597 }
598
599 public void ToXml2(XmlTextWriter writer) 586 public void ToXml2(XmlTextWriter writer)
600 { 587 {
601 //m_log.DebugFormat("[SOG]: Starting serialization of SOG {0} to XML2", Name); 588 //m_log.DebugFormat("[SOG]: Starting serialization of SOG {0} to XML2", Name);
diff --git a/OpenSim/Region/Framework/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/SceneXmlLoader.cs
index 49fe8a4..5418139 100644
--- a/OpenSim/Region/Framework/Scenes/SceneXmlLoader.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneXmlLoader.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes
101 101
102 public static string SaveGroupToXml2(SceneObjectGroup grp) 102 public static string SaveGroupToXml2(SceneObjectGroup grp)
103 { 103 {
104 return grp.ToXmlString2(); 104 return SceneObjectSerializer.ToXml2Format(grp);
105 } 105 }
106 106
107 public static SceneObjectGroup DeserializeGroupFromXml2(string xmlString) 107 public static SceneObjectGroup DeserializeGroupFromXml2(string xmlString)
@@ -278,7 +278,7 @@ namespace OpenSim.Region.Framework.Scenes
278 continue; 278 continue;
279 } 279 }
280 280
281 stream.WriteLine(g.ToXmlString2()); 281 stream.WriteLine(SceneObjectSerializer.ToXml2Format(g));
282 primCount++; 282 primCount++;
283 } 283 }
284 } 284 }
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index aa331d9..0ec1922 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -31,6 +31,7 @@ using System.Reflection;
31using System.Xml; 31using System.Xml;
32using log4net; 32using log4net;
33using OpenMetaverse; 33using OpenMetaverse;
34using OpenSim.Framework;
34using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
35 36
36namespace OpenSim.Region.Framework.Scenes.Serialization 37namespace OpenSim.Region.Framework.Scenes.Serialization
@@ -246,6 +247,24 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
246 writer.WriteEndElement(); // SceneObjectGroup 247 writer.WriteEndElement(); // SceneObjectGroup
247 248
248 //m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", Name, System.Environment.TickCount - time); 249 //m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", Name, System.Environment.TickCount - time);
250 }
251
252 /// <summary>
253 /// Serialize a scene object to the 'xml2' format.
254 /// </summary>
255 /// <param name="sceneObject"></param>
256 /// <returns></returns>
257 public static string ToXml2Format(ISceneObject sceneObject)
258 {
259 using (StringWriter sw = new StringWriter())
260 {
261 using (XmlTextWriter writer = new XmlTextWriter(sw))
262 {
263 sceneObject.ToXml2(writer);
264 }
265
266 return sw.ToString();
267 }
249 } 268 }
250 } 269 }
251} 270}