* refactor: split out part xml writing in SceneObjectSerializer

0.6.6-post-fixes
Justin Clarke Casey 2009-06-05 18:44:44 +00:00
parent 87097f2484
commit c20f31beff
1 changed files with 7 additions and 2 deletions

View File

@ -161,7 +161,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
writer.WriteStartElement(String.Empty, "RootPart", String.Empty);
sceneObject.RootPart.ToXml(writer);
ToOriginalXmlFormat(sceneObject.RootPart, writer);
writer.WriteEndElement();
writer.WriteStartElement(String.Empty, "OtherParts", String.Empty);
@ -172,7 +172,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
if (part.UUID != sceneObject.RootPart.UUID)
{
writer.WriteStartElement(String.Empty, "Part", String.Empty);
part.ToXml(writer);
ToOriginalXmlFormat(part, writer);
writer.WriteEndElement();
}
}
@ -185,6 +185,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
//m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", Name, System.Environment.TickCount - time);
}
protected static void ToOriginalXmlFormat(SceneObjectPart part, XmlTextWriter writer)
{
part.ToXml(writer);
}
public static SceneObjectGroup FromXml2Format(string xmlData)
{
//m_log.DebugFormat("[SOG]: Starting deserialization of SOG");