aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs33
1 files changed, 30 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 1839051..bb2eadb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -272,7 +272,6 @@ namespace OpenSim.Region.Environment.Scenes
272 reader.Read(); 272 reader.Read();
273 273
274 reader.ReadStartElement("SceneObjectGroup"); 274 reader.ReadStartElement("SceneObjectGroup");
275 // reader.ReadStartElement("RootPart");
276 m_rootPart = SceneObjectPart.FromXml(reader); 275 m_rootPart = SceneObjectPart.FromXml(reader);
277 276
278 reader.Read(); 277 reader.Read();
@@ -286,8 +285,7 @@ namespace OpenSim.Region.Environment.Scenes
286 if (reader.Name == "SceneObjectPart") 285 if (reader.Name == "SceneObjectPart")
287 { 286 {
288 SceneObjectPart Part = SceneObjectPart.FromXml(reader); 287 SceneObjectPart Part = SceneObjectPart.FromXml(reader);
289 AddPart(Part); 288 AddPart(Part);
290
291 } 289 }
292 break; 290 break;
293 case XmlNodeType.EndElement: 291 case XmlNodeType.EndElement:
@@ -375,6 +373,35 @@ namespace OpenSim.Region.Environment.Scenes
375 writer.WriteEndElement(); 373 writer.WriteEndElement();
376 } 374 }
377 375
376 public string ToXmlString2()
377 {
378 using (StringWriter sw = new StringWriter())
379 {
380 using (XmlTextWriter writer = new XmlTextWriter(sw))
381 {
382 ToXml2(writer);
383 }
384
385 return sw.ToString();
386 }
387 }
388
389 public void ToXml2(XmlTextWriter writer)
390 {
391 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
392 m_rootPart.ToXml(writer);
393 writer.WriteStartElement(String.Empty, "OtherParts", String.Empty);
394 foreach (SceneObjectPart part in m_parts.Values)
395 {
396 if (part.UUID != m_rootPart.UUID)
397 {
398 part.ToXml(writer);
399 }
400 }
401 writer.WriteEndElement();
402 writer.WriteEndElement();
403 }
404
378 #region Copying 405 #region Copying
379 406
380 /// <summary> 407 /// <summary>