aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMW2007-10-22 11:06:54 +0000
committerMW2007-10-22 11:06:54 +0000
commit2681de366b22d1fc57d808c0cd98da0426a0379e (patch)
tree2a88070a201dbadcff371b56edb1e101eb93fde1 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentBug fix, so that local loginserver (in standalone mode) can set a start posit... (diff)
downloadopensim-SC_OLD-2681de366b22d1fc57d808c0cd98da0426a0379e.zip
opensim-SC_OLD-2681de366b22d1fc57d808c0cd98da0426a0379e.tar.gz
opensim-SC_OLD-2681de366b22d1fc57d808c0cd98da0426a0379e.tar.bz2
opensim-SC_OLD-2681de366b22d1fc57d808c0cd98da0426a0379e.tar.xz
Made some changes to the load/save xml format, So that the old format can still be used, I have added new console commands of "load-xml2" and "save-xml2", if the old versions worked for you then please continue using them (at least for now). The new versions haven't been tested that much, so their format could be subject to change.
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>