* Just extracted a standard ToXml() on SceneObjectGroup

afrisby
lbsa71 2007-10-12 19:31:37 +00:00
parent 4c8d175564
commit b77bf18079
2 changed files with 15 additions and 5 deletions

View File

@ -311,8 +311,19 @@ namespace OpenSim.Region.Environment.Scenes
public string ToXmlString()
{
StringWriter sw = new StringWriter();
XmlTextWriter writer = new XmlTextWriter(sw);
using (StringWriter sw = new StringWriter())
{
using (XmlTextWriter writer = new XmlTextWriter(sw))
{
ToXml(writer);
}
return sw.ToString();
}
}
public void ToXml(XmlTextWriter writer)
{
writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
writer.WriteStartElement(String.Empty, "RootPart", String.Empty);
m_rootPart.ToXml(writer);
@ -329,8 +340,6 @@ namespace OpenSim.Region.Environment.Scenes
}
writer.WriteEndElement();
writer.WriteEndElement();
writer.Close();
return sw.ToString();
}
#region Copying

View File

@ -22,7 +22,8 @@ namespace OpenSim.Region.Environment.Scenes
private string m_inventoryFileName = "";
private LLUUID m_folderID = LLUUID.Zero;
[XmlIgnore] public PhysicsActor PhysActor = null;
[XmlIgnore]
public PhysicsActor PhysActor = null;
protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>();