diff options
Diffstat (limited to 'OpenSim')
9 files changed, 229 insertions, 241 deletions
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs index db46ea8..6debf65 100644 --- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs +++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Serialization.External | |||
51 | /// <param name="xtr"></param> | 51 | /// <param name="xtr"></param> |
52 | /// <returns>true on successful, false if there were any processing failures</returns> | 52 | /// <returns>true on successful, false if there were any processing failures</returns> |
53 | public static bool ExecuteReadProcessors<NodeType>( | 53 | public static bool ExecuteReadProcessors<NodeType>( |
54 | NodeType nodeToFill, Dictionary<string, Action<NodeType, XmlTextReader>> processors, XmlTextReader xtr) | 54 | NodeType nodeToFill, Dictionary<string, Action<NodeType, XmlReader>> processors, XmlReader xtr) |
55 | { | 55 | { |
56 | return ExecuteReadProcessors( | 56 | return ExecuteReadProcessors( |
57 | nodeToFill, | 57 | nodeToFill, |
@@ -75,8 +75,8 @@ namespace OpenSim.Framework.Serialization.External | |||
75 | /// <returns>true on successful, false if there were any processing failures</returns> | 75 | /// <returns>true on successful, false if there were any processing failures</returns> |
76 | public static bool ExecuteReadProcessors<NodeType>( | 76 | public static bool ExecuteReadProcessors<NodeType>( |
77 | NodeType nodeToFill, | 77 | NodeType nodeToFill, |
78 | Dictionary<string, Action<NodeType, XmlTextReader>> processors, | 78 | Dictionary<string, Action<NodeType, XmlReader>> processors, |
79 | XmlTextReader xtr, | 79 | XmlReader xtr, |
80 | Action<NodeType, string, Exception> parseExceptionAction) | 80 | Action<NodeType, string, Exception> parseExceptionAction) |
81 | { | 81 | { |
82 | bool errors = false; | 82 | bool errors = false; |
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Serialization.External | |||
88 | 88 | ||
89 | // m_log.DebugFormat("[ExternalRepresentationUtils]: Processing: {0}", nodeName); | 89 | // m_log.DebugFormat("[ExternalRepresentationUtils]: Processing: {0}", nodeName); |
90 | 90 | ||
91 | Action<NodeType, XmlTextReader> p = null; | 91 | Action<NodeType, XmlReader> p = null; |
92 | if (processors.TryGetValue(xtr.Name, out p)) | 92 | if (processors.TryGetValue(xtr.Name, out p)) |
93 | { | 93 | { |
94 | // m_log.DebugFormat("[ExternalRepresentationUtils]: Found {0} processor, nodeName); | 94 | // m_log.DebugFormat("[ExternalRepresentationUtils]: Found {0} processor, nodeName); |
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs index 4b5326a..e42d56f 100644 --- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs +++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs | |||
@@ -44,11 +44,11 @@ namespace OpenSim.Framework.Serialization.External | |||
44 | { | 44 | { |
45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private static Dictionary<string, Action<LandData, XmlTextReader>> m_ldProcessors | 47 | private static Dictionary<string, Action<LandData, XmlReader>> m_ldProcessors |
48 | = new Dictionary<string, Action<LandData, XmlTextReader>>(); | 48 | = new Dictionary<string, Action<LandData, XmlReader>>(); |
49 | 49 | ||
50 | private static Dictionary<string, Action<LandAccessEntry, XmlTextReader>> m_laeProcessors | 50 | private static Dictionary<string, Action<LandAccessEntry, XmlReader>> m_laeProcessors |
51 | = new Dictionary<string, Action<LandAccessEntry, XmlTextReader>>(); | 51 | = new Dictionary<string, Action<LandAccessEntry, XmlReader>>(); |
52 | 52 | ||
53 | static LandDataSerializer() | 53 | static LandDataSerializer() |
54 | { | 54 | { |
@@ -134,7 +134,7 @@ namespace OpenSim.Framework.Serialization.External | |||
134 | "AccessList", (lae, xtr) => lae.Flags = (AccessList)Convert.ToUInt32(xtr.ReadElementString("AccessList"))); | 134 | "AccessList", (lae, xtr) => lae.Flags = (AccessList)Convert.ToUInt32(xtr.ReadElementString("AccessList"))); |
135 | } | 135 | } |
136 | 136 | ||
137 | public static void ProcessParcelAccessList(LandData ld, XmlTextReader xtr) | 137 | public static void ProcessParcelAccessList(LandData ld, XmlReader xtr) |
138 | { | 138 | { |
139 | if (!xtr.IsEmptyElement) | 139 | if (!xtr.IsEmptyElement) |
140 | { | 140 | { |
diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs index 135cefb..994cede 100644 --- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs +++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs | |||
@@ -46,8 +46,8 @@ namespace OpenSim.Framework.Serialization.External | |||
46 | { | 46 | { |
47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | private static Dictionary<string, Action<InventoryItemBase, XmlTextReader>> m_InventoryItemXmlProcessors | 49 | private static Dictionary<string, Action<InventoryItemBase, XmlReader>> m_InventoryItemXmlProcessors |
50 | = new Dictionary<string, Action<InventoryItemBase, XmlTextReader>>(); | 50 | = new Dictionary<string, Action<InventoryItemBase, XmlReader>>(); |
51 | 51 | ||
52 | #region InventoryItemBase Processor initialization | 52 | #region InventoryItemBase Processor initialization |
53 | static UserInventoryItemSerializer() | 53 | static UserInventoryItemSerializer() |
@@ -76,103 +76,103 @@ namespace OpenSim.Framework.Serialization.External | |||
76 | #endregion | 76 | #endregion |
77 | 77 | ||
78 | #region InventoryItemBase Processors | 78 | #region InventoryItemBase Processors |
79 | private static void ProcessName(InventoryItemBase item, XmlTextReader reader) | 79 | private static void ProcessName(InventoryItemBase item, XmlReader reader) |
80 | { | 80 | { |
81 | item.Name = reader.ReadElementContentAsString("Name", String.Empty); | 81 | item.Name = reader.ReadElementContentAsString("Name", String.Empty); |
82 | } | 82 | } |
83 | 83 | ||
84 | private static void ProcessID(InventoryItemBase item, XmlTextReader reader) | 84 | private static void ProcessID(InventoryItemBase item, XmlReader reader) |
85 | { | 85 | { |
86 | item.ID = Util.ReadUUID(reader, "ID"); | 86 | item.ID = Util.ReadUUID(reader, "ID"); |
87 | } | 87 | } |
88 | 88 | ||
89 | private static void ProcessInvType(InventoryItemBase item, XmlTextReader reader) | 89 | private static void ProcessInvType(InventoryItemBase item, XmlReader reader) |
90 | { | 90 | { |
91 | item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); | 91 | item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); |
92 | } | 92 | } |
93 | 93 | ||
94 | private static void ProcessCreatorUUID(InventoryItemBase item, XmlTextReader reader) | 94 | private static void ProcessCreatorUUID(InventoryItemBase item, XmlReader reader) |
95 | { | 95 | { |
96 | item.CreatorId = reader.ReadElementContentAsString("CreatorUUID", String.Empty); | 96 | item.CreatorId = reader.ReadElementContentAsString("CreatorUUID", String.Empty); |
97 | } | 97 | } |
98 | 98 | ||
99 | private static void ProcessCreatorID(InventoryItemBase item, XmlTextReader reader) | 99 | private static void ProcessCreatorID(InventoryItemBase item, XmlReader reader) |
100 | { | 100 | { |
101 | // when it exists, this overrides the previous | 101 | // when it exists, this overrides the previous |
102 | item.CreatorId = reader.ReadElementContentAsString("CreatorID", String.Empty); | 102 | item.CreatorId = reader.ReadElementContentAsString("CreatorID", String.Empty); |
103 | } | 103 | } |
104 | 104 | ||
105 | private static void ProcessCreationDate(InventoryItemBase item, XmlTextReader reader) | 105 | private static void ProcessCreationDate(InventoryItemBase item, XmlReader reader) |
106 | { | 106 | { |
107 | item.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); | 107 | item.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); |
108 | } | 108 | } |
109 | 109 | ||
110 | private static void ProcessOwner(InventoryItemBase item, XmlTextReader reader) | 110 | private static void ProcessOwner(InventoryItemBase item, XmlReader reader) |
111 | { | 111 | { |
112 | item.Owner = Util.ReadUUID(reader, "Owner"); | 112 | item.Owner = Util.ReadUUID(reader, "Owner"); |
113 | } | 113 | } |
114 | 114 | ||
115 | private static void ProcessDescription(InventoryItemBase item, XmlTextReader reader) | 115 | private static void ProcessDescription(InventoryItemBase item, XmlReader reader) |
116 | { | 116 | { |
117 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); | 117 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); |
118 | } | 118 | } |
119 | 119 | ||
120 | private static void ProcessAssetType(InventoryItemBase item, XmlTextReader reader) | 120 | private static void ProcessAssetType(InventoryItemBase item, XmlReader reader) |
121 | { | 121 | { |
122 | item.AssetType = reader.ReadElementContentAsInt("AssetType", String.Empty); | 122 | item.AssetType = reader.ReadElementContentAsInt("AssetType", String.Empty); |
123 | } | 123 | } |
124 | 124 | ||
125 | private static void ProcessAssetID(InventoryItemBase item, XmlTextReader reader) | 125 | private static void ProcessAssetID(InventoryItemBase item, XmlReader reader) |
126 | { | 126 | { |
127 | item.AssetID = Util.ReadUUID(reader, "AssetID"); | 127 | item.AssetID = Util.ReadUUID(reader, "AssetID"); |
128 | } | 128 | } |
129 | 129 | ||
130 | private static void ProcessSaleType(InventoryItemBase item, XmlTextReader reader) | 130 | private static void ProcessSaleType(InventoryItemBase item, XmlReader reader) |
131 | { | 131 | { |
132 | item.SaleType = (byte)reader.ReadElementContentAsInt("SaleType", String.Empty); | 132 | item.SaleType = (byte)reader.ReadElementContentAsInt("SaleType", String.Empty); |
133 | } | 133 | } |
134 | 134 | ||
135 | private static void ProcessSalePrice(InventoryItemBase item, XmlTextReader reader) | 135 | private static void ProcessSalePrice(InventoryItemBase item, XmlReader reader) |
136 | { | 136 | { |
137 | item.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); | 137 | item.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); |
138 | } | 138 | } |
139 | 139 | ||
140 | private static void ProcessBasePermissions(InventoryItemBase item, XmlTextReader reader) | 140 | private static void ProcessBasePermissions(InventoryItemBase item, XmlReader reader) |
141 | { | 141 | { |
142 | item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); | 142 | item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); |
143 | } | 143 | } |
144 | 144 | ||
145 | private static void ProcessCurrentPermissions(InventoryItemBase item, XmlTextReader reader) | 145 | private static void ProcessCurrentPermissions(InventoryItemBase item, XmlReader reader) |
146 | { | 146 | { |
147 | item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); | 147 | item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); |
148 | } | 148 | } |
149 | 149 | ||
150 | private static void ProcessEveryOnePermissions(InventoryItemBase item, XmlTextReader reader) | 150 | private static void ProcessEveryOnePermissions(InventoryItemBase item, XmlReader reader) |
151 | { | 151 | { |
152 | item.EveryOnePermissions = (uint)reader.ReadElementContentAsInt("EveryOnePermissions", String.Empty); | 152 | item.EveryOnePermissions = (uint)reader.ReadElementContentAsInt("EveryOnePermissions", String.Empty); |
153 | } | 153 | } |
154 | 154 | ||
155 | private static void ProcessNextPermissions(InventoryItemBase item, XmlTextReader reader) | 155 | private static void ProcessNextPermissions(InventoryItemBase item, XmlReader reader) |
156 | { | 156 | { |
157 | item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); | 157 | item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); |
158 | } | 158 | } |
159 | 159 | ||
160 | private static void ProcessFlags(InventoryItemBase item, XmlTextReader reader) | 160 | private static void ProcessFlags(InventoryItemBase item, XmlReader reader) |
161 | { | 161 | { |
162 | item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); | 162 | item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); |
163 | } | 163 | } |
164 | 164 | ||
165 | private static void ProcessGroupID(InventoryItemBase item, XmlTextReader reader) | 165 | private static void ProcessGroupID(InventoryItemBase item, XmlReader reader) |
166 | { | 166 | { |
167 | item.GroupID = Util.ReadUUID(reader, "GroupID"); | 167 | item.GroupID = Util.ReadUUID(reader, "GroupID"); |
168 | } | 168 | } |
169 | 169 | ||
170 | private static void ProcessGroupOwned(InventoryItemBase item, XmlTextReader reader) | 170 | private static void ProcessGroupOwned(InventoryItemBase item, XmlReader reader) |
171 | { | 171 | { |
172 | item.GroupOwned = Util.ReadBoolean(reader); | 172 | item.GroupOwned = Util.ReadBoolean(reader); |
173 | } | 173 | } |
174 | 174 | ||
175 | private static void ProcessCreatorData(InventoryItemBase item, XmlTextReader reader) | 175 | private static void ProcessCreatorData(InventoryItemBase item, XmlReader reader) |
176 | { | 176 | { |
177 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | 177 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); |
178 | } | 178 | } |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 2d0178e..2c38571 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -2605,7 +2605,7 @@ namespace OpenSim.Framework | |||
2605 | } | 2605 | } |
2606 | 2606 | ||
2607 | #region Xml Serialization Utilities | 2607 | #region Xml Serialization Utilities |
2608 | public static bool ReadBoolean(XmlTextReader reader) | 2608 | public static bool ReadBoolean(XmlReader reader) |
2609 | { | 2609 | { |
2610 | // AuroraSim uses "int" for some fields that are boolean in OpenSim, e.g. "PassCollisions". Don't fail because of this. | 2610 | // AuroraSim uses "int" for some fields that are boolean in OpenSim, e.g. "PassCollisions". Don't fail because of this. |
2611 | reader.ReadStartElement(); | 2611 | reader.ReadStartElement(); |
@@ -2616,7 +2616,7 @@ namespace OpenSim.Framework | |||
2616 | return result; | 2616 | return result; |
2617 | } | 2617 | } |
2618 | 2618 | ||
2619 | public static UUID ReadUUID(XmlTextReader reader, string name) | 2619 | public static UUID ReadUUID(XmlReader reader, string name) |
2620 | { | 2620 | { |
2621 | UUID id; | 2621 | UUID id; |
2622 | string idStr; | 2622 | string idStr; |
@@ -2635,7 +2635,7 @@ namespace OpenSim.Framework | |||
2635 | return id; | 2635 | return id; |
2636 | } | 2636 | } |
2637 | 2637 | ||
2638 | public static Vector3 ReadVector(XmlTextReader reader, string name) | 2638 | public static Vector3 ReadVector(XmlReader reader, string name) |
2639 | { | 2639 | { |
2640 | Vector3 vec; | 2640 | Vector3 vec; |
2641 | 2641 | ||
@@ -2648,7 +2648,7 @@ namespace OpenSim.Framework | |||
2648 | return vec; | 2648 | return vec; |
2649 | } | 2649 | } |
2650 | 2650 | ||
2651 | public static Quaternion ReadQuaternion(XmlTextReader reader, string name) | 2651 | public static Quaternion ReadQuaternion(XmlReader reader, string name) |
2652 | { | 2652 | { |
2653 | Quaternion quat = new Quaternion(); | 2653 | Quaternion quat = new Quaternion(); |
2654 | 2654 | ||
@@ -2677,7 +2677,7 @@ namespace OpenSim.Framework | |||
2677 | return quat; | 2677 | return quat; |
2678 | } | 2678 | } |
2679 | 2679 | ||
2680 | public static T ReadEnum<T>(XmlTextReader reader, string name) | 2680 | public static T ReadEnum<T>(XmlReader reader, string name) |
2681 | { | 2681 | { |
2682 | string value = reader.ReadElementContentAsString(name, String.Empty); | 2682 | string value = reader.ReadElementContentAsString(name, String.Empty); |
2683 | // !!!!! to deal with flags without commas | 2683 | // !!!!! to deal with flags without commas |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 94cd9cd..a5bb1a7 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | |||
@@ -624,23 +624,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
624 | TestHelpers.InMethod(); | 624 | TestHelpers.InMethod(); |
625 | TestHelpers.EnableLogging(); | 625 | TestHelpers.EnableLogging(); |
626 | 626 | ||
627 | // We need to do this to get rid of whitespace between elements. | 627 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(ObjectWithOtherPartsXml); |
628 | // TODO: Ultimately OpenSimulator xml parser should be set to ignore this but this means a bit of | ||
629 | // rejigging to replace old new XmlTextReader() with the post .NET 2.0 XmlReader.Create() calls | ||
630 | XmlDocument xdoc = new XmlDocument(); | ||
631 | xdoc.LoadXml(ObjectWithOtherPartsXml); | ||
632 | |||
633 | StringBuilder sb = new StringBuilder(); | ||
634 | using (StringWriter sw = new StringWriter(sb)) | ||
635 | { | ||
636 | using (XmlTextWriter xtw = new XmlTextWriter(sw)) | ||
637 | { | ||
638 | // xtw.Formatting = Formatting.Indented; | ||
639 | xdoc.WriteTo(xtw); | ||
640 | } | ||
641 | } | ||
642 | |||
643 | SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(sb.ToString()); | ||
644 | SceneObjectPart[] parts = so.Parts; | 628 | SceneObjectPart[] parts = so.Parts; |
645 | Assert.AreEqual(3, so.Parts.Length); | 629 | Assert.AreEqual(3, so.Parts.Length); |
646 | 630 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index cbb4fe7..3489873 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2214,49 +2214,52 @@ namespace OpenSim.Region.Framework.Scenes | |||
2214 | 2214 | ||
2215 | try | 2215 | try |
2216 | { | 2216 | { |
2217 | using (XmlTextReader reader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 2217 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
2218 | { | 2218 | { |
2219 | reader.Read(); | 2219 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) |
2220 | bool isSingleObject = reader.Name != "CoalescedObject"; | ||
2221 | |||
2222 | if (isSingleObject || isAttachment) | ||
2223 | { | 2220 | { |
2224 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader); | 2221 | reader.Read(); |
2225 | objlist.Add(g); | 2222 | bool isSingleObject = reader.Name != "CoalescedObject"; |
2226 | veclist.Add(Vector3.Zero); | 2223 | |
2227 | bbox = g.GetAxisAlignedBoundingBox(out offsetHeight); | 2224 | if (isSingleObject || isAttachment) |
2228 | return true; | ||
2229 | } | ||
2230 | else | ||
2231 | { | ||
2232 | XmlDocument doc = new XmlDocument(); | ||
2233 | doc.LoadXml(xmlData); | ||
2234 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | ||
2235 | XmlElement coll = (XmlElement)e; | ||
2236 | float bx = Convert.ToSingle(coll.GetAttribute("x")); | ||
2237 | float by = Convert.ToSingle(coll.GetAttribute("y")); | ||
2238 | float bz = Convert.ToSingle(coll.GetAttribute("z")); | ||
2239 | bbox = new Vector3(bx, by, bz); | ||
2240 | offsetHeight = 0; | ||
2241 | |||
2242 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | ||
2243 | foreach (XmlNode n in groups) | ||
2244 | { | 2225 | { |
2245 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); | 2226 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(reader); |
2246 | objlist.Add(g); | 2227 | objlist.Add(g); |
2247 | 2228 | veclist.Add(Vector3.Zero); | |
2248 | XmlElement el = (XmlElement)n; | 2229 | bbox = g.GetAxisAlignedBoundingBox(out offsetHeight); |
2249 | string rawX = el.GetAttribute("offsetx"); | 2230 | return true; |
2250 | string rawY = el.GetAttribute("offsety"); | ||
2251 | string rawZ = el.GetAttribute("offsetz"); | ||
2252 | |||
2253 | float x = Convert.ToSingle(rawX); | ||
2254 | float y = Convert.ToSingle(rawY); | ||
2255 | float z = Convert.ToSingle(rawZ); | ||
2256 | veclist.Add(new Vector3(x, y, z)); | ||
2257 | } | 2231 | } |
2232 | else | ||
2233 | { | ||
2234 | XmlDocument doc = new XmlDocument(); | ||
2235 | doc.LoadXml(xmlData); | ||
2236 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | ||
2237 | XmlElement coll = (XmlElement)e; | ||
2238 | float bx = Convert.ToSingle(coll.GetAttribute("x")); | ||
2239 | float by = Convert.ToSingle(coll.GetAttribute("y")); | ||
2240 | float bz = Convert.ToSingle(coll.GetAttribute("z")); | ||
2241 | bbox = new Vector3(bx, by, bz); | ||
2242 | offsetHeight = 0; | ||
2243 | |||
2244 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | ||
2245 | foreach (XmlNode n in groups) | ||
2246 | { | ||
2247 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); | ||
2248 | objlist.Add(g); | ||
2249 | |||
2250 | XmlElement el = (XmlElement)n; | ||
2251 | string rawX = el.GetAttribute("offsetx"); | ||
2252 | string rawY = el.GetAttribute("offsety"); | ||
2253 | string rawZ = el.GetAttribute("offsetz"); | ||
2254 | |||
2255 | float x = Convert.ToSingle(rawX); | ||
2256 | float y = Convert.ToSingle(rawY); | ||
2257 | float z = Convert.ToSingle(rawZ); | ||
2258 | veclist.Add(new Vector3(x, y, z)); | ||
2259 | } | ||
2258 | 2260 | ||
2259 | return false; | 2261 | return false; |
2262 | } | ||
2260 | } | 2263 | } |
2261 | } | 2264 | } |
2262 | } | 2265 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c95d207..e37bbd8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -902,7 +902,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
902 | } | 902 | } |
903 | } | 903 | } |
904 | 904 | ||
905 | public void LoadScriptState(XmlTextReader reader) | 905 | public void LoadScriptState(XmlReader reader) |
906 | { | 906 | { |
907 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Looking for script state for {0} in {1}", Name); | 907 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Looking for script state for {0} in {1}", Name); |
908 | 908 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 31fc26e..05e3ee9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2044 | /// </summary> | 2044 | /// </summary> |
2045 | /// <param name="xmlReader"></param> | 2045 | /// <param name="xmlReader"></param> |
2046 | /// <returns></returns> | 2046 | /// <returns></returns> |
2047 | public static SceneObjectPart FromXml(XmlTextReader xmlReader) | 2047 | public static SceneObjectPart FromXml(XmlReader xmlReader) |
2048 | { | 2048 | { |
2049 | SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader); | 2049 | SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader); |
2050 | 2050 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 8f99dc6..3899b99 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -59,8 +59,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
59 | /// <returns>The scene object deserialized. Null on failure.</returns> | 59 | /// <returns>The scene object deserialized. Null on failure.</returns> |
60 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) | 60 | public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) |
61 | { | 61 | { |
62 | using (XmlTextReader reader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 62 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
63 | return FromOriginalXmlFormat(reader); | 63 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) |
64 | return FromOriginalXmlFormat(reader); | ||
64 | } | 65 | } |
65 | 66 | ||
66 | /// <summary> | 67 | /// <summary> |
@@ -68,7 +69,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
68 | /// </summary> | 69 | /// </summary> |
69 | /// <param name="xmlData"></param> | 70 | /// <param name="xmlData"></param> |
70 | /// <returns>The scene object deserialized. Null on failure.</returns> | 71 | /// <returns>The scene object deserialized. Null on failure.</returns> |
71 | public static SceneObjectGroup FromOriginalXmlFormat(XmlTextReader reader) | 72 | public static SceneObjectGroup FromOriginalXmlFormat(XmlReader reader) |
72 | { | 73 | { |
73 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); | 74 | //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); |
74 | //int time = System.Environment.TickCount; | 75 | //int time = System.Environment.TickCount; |
@@ -370,14 +371,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
370 | 371 | ||
371 | #region manual serialization | 372 | #region manual serialization |
372 | 373 | ||
373 | private static Dictionary<string, Action<SceneObjectPart, XmlTextReader>> m_SOPXmlProcessors | 374 | private static Dictionary<string, Action<SceneObjectPart, XmlReader>> m_SOPXmlProcessors |
374 | = new Dictionary<string, Action<SceneObjectPart, XmlTextReader>>(); | 375 | = new Dictionary<string, Action<SceneObjectPart, XmlReader>>(); |
375 | 376 | ||
376 | private static Dictionary<string, Action<TaskInventoryItem, XmlTextReader>> m_TaskInventoryXmlProcessors | 377 | private static Dictionary<string, Action<TaskInventoryItem, XmlReader>> m_TaskInventoryXmlProcessors |
377 | = new Dictionary<string, Action<TaskInventoryItem, XmlTextReader>>(); | 378 | = new Dictionary<string, Action<TaskInventoryItem, XmlReader>>(); |
378 | 379 | ||
379 | private static Dictionary<string, Action<PrimitiveBaseShape, XmlTextReader>> m_ShapeXmlProcessors | 380 | private static Dictionary<string, Action<PrimitiveBaseShape, XmlReader>> m_ShapeXmlProcessors |
380 | = new Dictionary<string, Action<PrimitiveBaseShape, XmlTextReader>>(); | 381 | = new Dictionary<string, Action<PrimitiveBaseShape, XmlReader>>(); |
381 | 382 | ||
382 | static SceneObjectSerializer() | 383 | static SceneObjectSerializer() |
383 | { | 384 | { |
@@ -533,112 +534,112 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
533 | } | 534 | } |
534 | 535 | ||
535 | #region SOPXmlProcessors | 536 | #region SOPXmlProcessors |
536 | private static void ProcessAllowedDrop(SceneObjectPart obj, XmlTextReader reader) | 537 | private static void ProcessAllowedDrop(SceneObjectPart obj, XmlReader reader) |
537 | { | 538 | { |
538 | obj.AllowedDrop = Util.ReadBoolean(reader); | 539 | obj.AllowedDrop = Util.ReadBoolean(reader); |
539 | } | 540 | } |
540 | 541 | ||
541 | private static void ProcessCreatorID(SceneObjectPart obj, XmlTextReader reader) | 542 | private static void ProcessCreatorID(SceneObjectPart obj, XmlReader reader) |
542 | { | 543 | { |
543 | obj.CreatorID = Util.ReadUUID(reader, "CreatorID"); | 544 | obj.CreatorID = Util.ReadUUID(reader, "CreatorID"); |
544 | } | 545 | } |
545 | 546 | ||
546 | private static void ProcessCreatorData(SceneObjectPart obj, XmlTextReader reader) | 547 | private static void ProcessCreatorData(SceneObjectPart obj, XmlReader reader) |
547 | { | 548 | { |
548 | obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | 549 | obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); |
549 | } | 550 | } |
550 | 551 | ||
551 | private static void ProcessFolderID(SceneObjectPart obj, XmlTextReader reader) | 552 | private static void ProcessFolderID(SceneObjectPart obj, XmlReader reader) |
552 | { | 553 | { |
553 | obj.FolderID = Util.ReadUUID(reader, "FolderID"); | 554 | obj.FolderID = Util.ReadUUID(reader, "FolderID"); |
554 | } | 555 | } |
555 | 556 | ||
556 | private static void ProcessInventorySerial(SceneObjectPart obj, XmlTextReader reader) | 557 | private static void ProcessInventorySerial(SceneObjectPart obj, XmlReader reader) |
557 | { | 558 | { |
558 | obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty); | 559 | obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty); |
559 | } | 560 | } |
560 | 561 | ||
561 | private static void ProcessTaskInventory(SceneObjectPart obj, XmlTextReader reader) | 562 | private static void ProcessTaskInventory(SceneObjectPart obj, XmlReader reader) |
562 | { | 563 | { |
563 | obj.TaskInventory = ReadTaskInventory(reader, "TaskInventory"); | 564 | obj.TaskInventory = ReadTaskInventory(reader, "TaskInventory"); |
564 | } | 565 | } |
565 | 566 | ||
566 | private static void ProcessUUID(SceneObjectPart obj, XmlTextReader reader) | 567 | private static void ProcessUUID(SceneObjectPart obj, XmlReader reader) |
567 | { | 568 | { |
568 | obj.UUID = Util.ReadUUID(reader, "UUID"); | 569 | obj.UUID = Util.ReadUUID(reader, "UUID"); |
569 | } | 570 | } |
570 | 571 | ||
571 | private static void ProcessLocalId(SceneObjectPart obj, XmlTextReader reader) | 572 | private static void ProcessLocalId(SceneObjectPart obj, XmlReader reader) |
572 | { | 573 | { |
573 | obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty); | 574 | obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty); |
574 | } | 575 | } |
575 | 576 | ||
576 | private static void ProcessName(SceneObjectPart obj, XmlTextReader reader) | 577 | private static void ProcessName(SceneObjectPart obj, XmlReader reader) |
577 | { | 578 | { |
578 | obj.Name = reader.ReadElementString("Name"); | 579 | obj.Name = reader.ReadElementString("Name"); |
579 | } | 580 | } |
580 | 581 | ||
581 | private static void ProcessMaterial(SceneObjectPart obj, XmlTextReader reader) | 582 | private static void ProcessMaterial(SceneObjectPart obj, XmlReader reader) |
582 | { | 583 | { |
583 | obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty); | 584 | obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty); |
584 | } | 585 | } |
585 | 586 | ||
586 | private static void ProcessPassTouches(SceneObjectPart obj, XmlTextReader reader) | 587 | private static void ProcessPassTouches(SceneObjectPart obj, XmlReader reader) |
587 | { | 588 | { |
588 | obj.PassTouches = Util.ReadBoolean(reader); | 589 | obj.PassTouches = Util.ReadBoolean(reader); |
589 | } | 590 | } |
590 | 591 | ||
591 | private static void ProcessPassCollisions(SceneObjectPart obj, XmlTextReader reader) | 592 | private static void ProcessPassCollisions(SceneObjectPart obj, XmlReader reader) |
592 | { | 593 | { |
593 | obj.PassCollisions = Util.ReadBoolean(reader); | 594 | obj.PassCollisions = Util.ReadBoolean(reader); |
594 | } | 595 | } |
595 | 596 | ||
596 | private static void ProcessRegionHandle(SceneObjectPart obj, XmlTextReader reader) | 597 | private static void ProcessRegionHandle(SceneObjectPart obj, XmlReader reader) |
597 | { | 598 | { |
598 | obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty); | 599 | obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty); |
599 | } | 600 | } |
600 | 601 | ||
601 | private static void ProcessScriptAccessPin(SceneObjectPart obj, XmlTextReader reader) | 602 | private static void ProcessScriptAccessPin(SceneObjectPart obj, XmlReader reader) |
602 | { | 603 | { |
603 | obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty); | 604 | obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty); |
604 | } | 605 | } |
605 | 606 | ||
606 | private static void ProcessGroupPosition(SceneObjectPart obj, XmlTextReader reader) | 607 | private static void ProcessGroupPosition(SceneObjectPart obj, XmlReader reader) |
607 | { | 608 | { |
608 | obj.GroupPosition = Util.ReadVector(reader, "GroupPosition"); | 609 | obj.GroupPosition = Util.ReadVector(reader, "GroupPosition"); |
609 | } | 610 | } |
610 | 611 | ||
611 | private static void ProcessOffsetPosition(SceneObjectPart obj, XmlTextReader reader) | 612 | private static void ProcessOffsetPosition(SceneObjectPart obj, XmlReader reader) |
612 | { | 613 | { |
613 | obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ; | 614 | obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ; |
614 | } | 615 | } |
615 | 616 | ||
616 | private static void ProcessRotationOffset(SceneObjectPart obj, XmlTextReader reader) | 617 | private static void ProcessRotationOffset(SceneObjectPart obj, XmlReader reader) |
617 | { | 618 | { |
618 | obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset"); | 619 | obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset"); |
619 | } | 620 | } |
620 | 621 | ||
621 | private static void ProcessVelocity(SceneObjectPart obj, XmlTextReader reader) | 622 | private static void ProcessVelocity(SceneObjectPart obj, XmlReader reader) |
622 | { | 623 | { |
623 | obj.Velocity = Util.ReadVector(reader, "Velocity"); | 624 | obj.Velocity = Util.ReadVector(reader, "Velocity"); |
624 | } | 625 | } |
625 | 626 | ||
626 | private static void ProcessAngularVelocity(SceneObjectPart obj, XmlTextReader reader) | 627 | private static void ProcessAngularVelocity(SceneObjectPart obj, XmlReader reader) |
627 | { | 628 | { |
628 | obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity"); | 629 | obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity"); |
629 | } | 630 | } |
630 | 631 | ||
631 | private static void ProcessAcceleration(SceneObjectPart obj, XmlTextReader reader) | 632 | private static void ProcessAcceleration(SceneObjectPart obj, XmlReader reader) |
632 | { | 633 | { |
633 | obj.Acceleration = Util.ReadVector(reader, "Acceleration"); | 634 | obj.Acceleration = Util.ReadVector(reader, "Acceleration"); |
634 | } | 635 | } |
635 | 636 | ||
636 | private static void ProcessDescription(SceneObjectPart obj, XmlTextReader reader) | 637 | private static void ProcessDescription(SceneObjectPart obj, XmlReader reader) |
637 | { | 638 | { |
638 | obj.Description = reader.ReadElementString("Description"); | 639 | obj.Description = reader.ReadElementString("Description"); |
639 | } | 640 | } |
640 | 641 | ||
641 | private static void ProcessColor(SceneObjectPart obj, XmlTextReader reader) | 642 | private static void ProcessColor(SceneObjectPart obj, XmlReader reader) |
642 | { | 643 | { |
643 | reader.ReadStartElement("Color"); | 644 | reader.ReadStartElement("Color"); |
644 | if (reader.Name == "R") | 645 | if (reader.Name == "R") |
@@ -652,57 +653,57 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
652 | } | 653 | } |
653 | } | 654 | } |
654 | 655 | ||
655 | private static void ProcessText(SceneObjectPart obj, XmlTextReader reader) | 656 | private static void ProcessText(SceneObjectPart obj, XmlReader reader) |
656 | { | 657 | { |
657 | obj.Text = reader.ReadElementString("Text", String.Empty); | 658 | obj.Text = reader.ReadElementString("Text", String.Empty); |
658 | } | 659 | } |
659 | 660 | ||
660 | private static void ProcessSitName(SceneObjectPart obj, XmlTextReader reader) | 661 | private static void ProcessSitName(SceneObjectPart obj, XmlReader reader) |
661 | { | 662 | { |
662 | obj.SitName = reader.ReadElementString("SitName", String.Empty); | 663 | obj.SitName = reader.ReadElementString("SitName", String.Empty); |
663 | } | 664 | } |
664 | 665 | ||
665 | private static void ProcessTouchName(SceneObjectPart obj, XmlTextReader reader) | 666 | private static void ProcessTouchName(SceneObjectPart obj, XmlReader reader) |
666 | { | 667 | { |
667 | obj.TouchName = reader.ReadElementString("TouchName", String.Empty); | 668 | obj.TouchName = reader.ReadElementString("TouchName", String.Empty); |
668 | } | 669 | } |
669 | 670 | ||
670 | private static void ProcessLinkNum(SceneObjectPart obj, XmlTextReader reader) | 671 | private static void ProcessLinkNum(SceneObjectPart obj, XmlReader reader) |
671 | { | 672 | { |
672 | obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty); | 673 | obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty); |
673 | } | 674 | } |
674 | 675 | ||
675 | private static void ProcessClickAction(SceneObjectPart obj, XmlTextReader reader) | 676 | private static void ProcessClickAction(SceneObjectPart obj, XmlReader reader) |
676 | { | 677 | { |
677 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); | 678 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); |
678 | } | 679 | } |
679 | 680 | ||
680 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlTextReader reader) | 681 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader) |
681 | { | 682 | { |
682 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); | 683 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); |
683 | } | 684 | } |
684 | 685 | ||
685 | private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader) | 686 | private static void ProcessDensity(SceneObjectPart obj, XmlReader reader) |
686 | { | 687 | { |
687 | obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty); | 688 | obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty); |
688 | } | 689 | } |
689 | 690 | ||
690 | private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader) | 691 | private static void ProcessFriction(SceneObjectPart obj, XmlReader reader) |
691 | { | 692 | { |
692 | obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty); | 693 | obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty); |
693 | } | 694 | } |
694 | 695 | ||
695 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) | 696 | private static void ProcessBounce(SceneObjectPart obj, XmlReader reader) |
696 | { | 697 | { |
697 | obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty); | 698 | obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty); |
698 | } | 699 | } |
699 | 700 | ||
700 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) | 701 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlReader reader) |
701 | { | 702 | { |
702 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); | 703 | obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); |
703 | } | 704 | } |
704 | 705 | ||
705 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) | 706 | private static void ProcessShape(SceneObjectPart obj, XmlReader reader) |
706 | { | 707 | { |
707 | List<string> errorNodeNames; | 708 | List<string> errorNodeNames; |
708 | obj.Shape = ReadShape(reader, "Shape", out errorNodeNames); | 709 | obj.Shape = ReadShape(reader, "Shape", out errorNodeNames); |
@@ -715,163 +716,163 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
715 | } | 716 | } |
716 | } | 717 | } |
717 | 718 | ||
718 | private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) | 719 | private static void ProcessScale(SceneObjectPart obj, XmlReader reader) |
719 | { | 720 | { |
720 | obj.Scale = Util.ReadVector(reader, "Scale"); | 721 | obj.Scale = Util.ReadVector(reader, "Scale"); |
721 | } | 722 | } |
722 | 723 | ||
723 | private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader) | 724 | private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlReader reader) |
724 | { | 725 | { |
725 | obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); | 726 | obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); |
726 | } | 727 | } |
727 | 728 | ||
728 | private static void ProcessSitTargetPosition(SceneObjectPart obj, XmlTextReader reader) | 729 | private static void ProcessSitTargetPosition(SceneObjectPart obj, XmlReader reader) |
729 | { | 730 | { |
730 | obj.SitTargetPosition = Util.ReadVector(reader, "SitTargetPosition"); | 731 | obj.SitTargetPosition = Util.ReadVector(reader, "SitTargetPosition"); |
731 | } | 732 | } |
732 | 733 | ||
733 | private static void ProcessSitTargetPositionLL(SceneObjectPart obj, XmlTextReader reader) | 734 | private static void ProcessSitTargetPositionLL(SceneObjectPart obj, XmlReader reader) |
734 | { | 735 | { |
735 | obj.SitTargetPositionLL = Util.ReadVector(reader, "SitTargetPositionLL"); | 736 | obj.SitTargetPositionLL = Util.ReadVector(reader, "SitTargetPositionLL"); |
736 | } | 737 | } |
737 | 738 | ||
738 | private static void ProcessSitTargetOrientationLL(SceneObjectPart obj, XmlTextReader reader) | 739 | private static void ProcessSitTargetOrientationLL(SceneObjectPart obj, XmlReader reader) |
739 | { | 740 | { |
740 | obj.SitTargetOrientationLL = Util.ReadQuaternion(reader, "SitTargetOrientationLL"); | 741 | obj.SitTargetOrientationLL = Util.ReadQuaternion(reader, "SitTargetOrientationLL"); |
741 | } | 742 | } |
742 | 743 | ||
743 | private static void ProcessParentID(SceneObjectPart obj, XmlTextReader reader) | 744 | private static void ProcessParentID(SceneObjectPart obj, XmlReader reader) |
744 | { | 745 | { |
745 | string str = reader.ReadElementContentAsString("ParentID", String.Empty); | 746 | string str = reader.ReadElementContentAsString("ParentID", String.Empty); |
746 | obj.ParentID = Convert.ToUInt32(str); | 747 | obj.ParentID = Convert.ToUInt32(str); |
747 | } | 748 | } |
748 | 749 | ||
749 | private static void ProcessCreationDate(SceneObjectPart obj, XmlTextReader reader) | 750 | private static void ProcessCreationDate(SceneObjectPart obj, XmlReader reader) |
750 | { | 751 | { |
751 | obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); | 752 | obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); |
752 | } | 753 | } |
753 | 754 | ||
754 | private static void ProcessCategory(SceneObjectPart obj, XmlTextReader reader) | 755 | private static void ProcessCategory(SceneObjectPart obj, XmlReader reader) |
755 | { | 756 | { |
756 | obj.Category = (uint)reader.ReadElementContentAsInt("Category", String.Empty); | 757 | obj.Category = (uint)reader.ReadElementContentAsInt("Category", String.Empty); |
757 | } | 758 | } |
758 | 759 | ||
759 | private static void ProcessSalePrice(SceneObjectPart obj, XmlTextReader reader) | 760 | private static void ProcessSalePrice(SceneObjectPart obj, XmlReader reader) |
760 | { | 761 | { |
761 | obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); | 762 | obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); |
762 | } | 763 | } |
763 | 764 | ||
764 | private static void ProcessObjectSaleType(SceneObjectPart obj, XmlTextReader reader) | 765 | private static void ProcessObjectSaleType(SceneObjectPart obj, XmlReader reader) |
765 | { | 766 | { |
766 | obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty); | 767 | obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty); |
767 | } | 768 | } |
768 | 769 | ||
769 | private static void ProcessOwnershipCost(SceneObjectPart obj, XmlTextReader reader) | 770 | private static void ProcessOwnershipCost(SceneObjectPart obj, XmlReader reader) |
770 | { | 771 | { |
771 | obj.OwnershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); | 772 | obj.OwnershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); |
772 | } | 773 | } |
773 | 774 | ||
774 | private static void ProcessGroupID(SceneObjectPart obj, XmlTextReader reader) | 775 | private static void ProcessGroupID(SceneObjectPart obj, XmlReader reader) |
775 | { | 776 | { |
776 | obj.GroupID = Util.ReadUUID(reader, "GroupID"); | 777 | obj.GroupID = Util.ReadUUID(reader, "GroupID"); |
777 | } | 778 | } |
778 | 779 | ||
779 | private static void ProcessOwnerID(SceneObjectPart obj, XmlTextReader reader) | 780 | private static void ProcessOwnerID(SceneObjectPart obj, XmlReader reader) |
780 | { | 781 | { |
781 | obj.OwnerID = Util.ReadUUID(reader, "OwnerID"); | 782 | obj.OwnerID = Util.ReadUUID(reader, "OwnerID"); |
782 | } | 783 | } |
783 | 784 | ||
784 | private static void ProcessLastOwnerID(SceneObjectPart obj, XmlTextReader reader) | 785 | private static void ProcessLastOwnerID(SceneObjectPart obj, XmlReader reader) |
785 | { | 786 | { |
786 | obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); | 787 | obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); |
787 | } | 788 | } |
788 | 789 | ||
789 | private static void ProcessBaseMask(SceneObjectPart obj, XmlTextReader reader) | 790 | private static void ProcessBaseMask(SceneObjectPart obj, XmlReader reader) |
790 | { | 791 | { |
791 | obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); | 792 | obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); |
792 | } | 793 | } |
793 | 794 | ||
794 | private static void ProcessOwnerMask(SceneObjectPart obj, XmlTextReader reader) | 795 | private static void ProcessOwnerMask(SceneObjectPart obj, XmlReader reader) |
795 | { | 796 | { |
796 | obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty); | 797 | obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty); |
797 | } | 798 | } |
798 | 799 | ||
799 | private static void ProcessGroupMask(SceneObjectPart obj, XmlTextReader reader) | 800 | private static void ProcessGroupMask(SceneObjectPart obj, XmlReader reader) |
800 | { | 801 | { |
801 | obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty); | 802 | obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty); |
802 | } | 803 | } |
803 | 804 | ||
804 | private static void ProcessEveryoneMask(SceneObjectPart obj, XmlTextReader reader) | 805 | private static void ProcessEveryoneMask(SceneObjectPart obj, XmlReader reader) |
805 | { | 806 | { |
806 | obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty); | 807 | obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty); |
807 | } | 808 | } |
808 | 809 | ||
809 | private static void ProcessNextOwnerMask(SceneObjectPart obj, XmlTextReader reader) | 810 | private static void ProcessNextOwnerMask(SceneObjectPart obj, XmlReader reader) |
810 | { | 811 | { |
811 | obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty); | 812 | obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty); |
812 | } | 813 | } |
813 | 814 | ||
814 | private static void ProcessFlags(SceneObjectPart obj, XmlTextReader reader) | 815 | private static void ProcessFlags(SceneObjectPart obj, XmlReader reader) |
815 | { | 816 | { |
816 | obj.Flags = Util.ReadEnum<PrimFlags>(reader, "Flags"); | 817 | obj.Flags = Util.ReadEnum<PrimFlags>(reader, "Flags"); |
817 | } | 818 | } |
818 | 819 | ||
819 | private static void ProcessCollisionSound(SceneObjectPart obj, XmlTextReader reader) | 820 | private static void ProcessCollisionSound(SceneObjectPart obj, XmlReader reader) |
820 | { | 821 | { |
821 | obj.CollisionSound = Util.ReadUUID(reader, "CollisionSound"); | 822 | obj.CollisionSound = Util.ReadUUID(reader, "CollisionSound"); |
822 | } | 823 | } |
823 | 824 | ||
824 | private static void ProcessCollisionSoundVolume(SceneObjectPart obj, XmlTextReader reader) | 825 | private static void ProcessCollisionSoundVolume(SceneObjectPart obj, XmlReader reader) |
825 | { | 826 | { |
826 | obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty); | 827 | obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty); |
827 | } | 828 | } |
828 | 829 | ||
829 | private static void ProcessMediaUrl(SceneObjectPart obj, XmlTextReader reader) | 830 | private static void ProcessMediaUrl(SceneObjectPart obj, XmlReader reader) |
830 | { | 831 | { |
831 | obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); | 832 | obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); |
832 | } | 833 | } |
833 | 834 | ||
834 | private static void ProcessAttachedPos(SceneObjectPart obj, XmlTextReader reader) | 835 | private static void ProcessAttachedPos(SceneObjectPart obj, XmlReader reader) |
835 | { | 836 | { |
836 | obj.AttachedPos = Util.ReadVector(reader, "AttachedPos"); | 837 | obj.AttachedPos = Util.ReadVector(reader, "AttachedPos"); |
837 | } | 838 | } |
838 | 839 | ||
839 | private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader) | 840 | private static void ProcessDynAttrs(SceneObjectPart obj, XmlReader reader) |
840 | { | 841 | { |
841 | obj.DynAttrs.ReadXml(reader); | 842 | obj.DynAttrs.ReadXml(reader); |
842 | } | 843 | } |
843 | 844 | ||
844 | private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader) | 845 | private static void ProcessTextureAnimation(SceneObjectPart obj, XmlReader reader) |
845 | { | 846 | { |
846 | obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); | 847 | obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); |
847 | } | 848 | } |
848 | 849 | ||
849 | private static void ProcessParticleSystem(SceneObjectPart obj, XmlTextReader reader) | 850 | private static void ProcessParticleSystem(SceneObjectPart obj, XmlReader reader) |
850 | { | 851 | { |
851 | obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); | 852 | obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); |
852 | } | 853 | } |
853 | 854 | ||
854 | private static void ProcessPayPrice0(SceneObjectPart obj, XmlTextReader reader) | 855 | private static void ProcessPayPrice0(SceneObjectPart obj, XmlReader reader) |
855 | { | 856 | { |
856 | obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty); | 857 | obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty); |
857 | } | 858 | } |
858 | 859 | ||
859 | private static void ProcessPayPrice1(SceneObjectPart obj, XmlTextReader reader) | 860 | private static void ProcessPayPrice1(SceneObjectPart obj, XmlReader reader) |
860 | { | 861 | { |
861 | obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty); | 862 | obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty); |
862 | } | 863 | } |
863 | 864 | ||
864 | private static void ProcessPayPrice2(SceneObjectPart obj, XmlTextReader reader) | 865 | private static void ProcessPayPrice2(SceneObjectPart obj, XmlReader reader) |
865 | { | 866 | { |
866 | obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty); | 867 | obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty); |
867 | } | 868 | } |
868 | 869 | ||
869 | private static void ProcessPayPrice3(SceneObjectPart obj, XmlTextReader reader) | 870 | private static void ProcessPayPrice3(SceneObjectPart obj, XmlReader reader) |
870 | { | 871 | { |
871 | obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty); | 872 | obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty); |
872 | } | 873 | } |
873 | 874 | ||
874 | private static void ProcessPayPrice4(SceneObjectPart obj, XmlTextReader reader) | 875 | private static void ProcessPayPrice4(SceneObjectPart obj, XmlReader reader) |
875 | { | 876 | { |
876 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); | 877 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); |
877 | } | 878 | } |
@@ -879,122 +880,122 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
879 | #endregion | 880 | #endregion |
880 | 881 | ||
881 | #region TaskInventoryXmlProcessors | 882 | #region TaskInventoryXmlProcessors |
882 | private static void ProcessTIAssetID(TaskInventoryItem item, XmlTextReader reader) | 883 | private static void ProcessTIAssetID(TaskInventoryItem item, XmlReader reader) |
883 | { | 884 | { |
884 | item.AssetID = Util.ReadUUID(reader, "AssetID"); | 885 | item.AssetID = Util.ReadUUID(reader, "AssetID"); |
885 | } | 886 | } |
886 | 887 | ||
887 | private static void ProcessTIBasePermissions(TaskInventoryItem item, XmlTextReader reader) | 888 | private static void ProcessTIBasePermissions(TaskInventoryItem item, XmlReader reader) |
888 | { | 889 | { |
889 | item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); | 890 | item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); |
890 | } | 891 | } |
891 | 892 | ||
892 | private static void ProcessTICreationDate(TaskInventoryItem item, XmlTextReader reader) | 893 | private static void ProcessTICreationDate(TaskInventoryItem item, XmlReader reader) |
893 | { | 894 | { |
894 | item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty); | 895 | item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty); |
895 | } | 896 | } |
896 | 897 | ||
897 | private static void ProcessTICreatorID(TaskInventoryItem item, XmlTextReader reader) | 898 | private static void ProcessTICreatorID(TaskInventoryItem item, XmlReader reader) |
898 | { | 899 | { |
899 | item.CreatorID = Util.ReadUUID(reader, "CreatorID"); | 900 | item.CreatorID = Util.ReadUUID(reader, "CreatorID"); |
900 | } | 901 | } |
901 | 902 | ||
902 | private static void ProcessTICreatorData(TaskInventoryItem item, XmlTextReader reader) | 903 | private static void ProcessTICreatorData(TaskInventoryItem item, XmlReader reader) |
903 | { | 904 | { |
904 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); | 905 | item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); |
905 | } | 906 | } |
906 | 907 | ||
907 | private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader) | 908 | private static void ProcessTIDescription(TaskInventoryItem item, XmlReader reader) |
908 | { | 909 | { |
909 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); | 910 | item.Description = reader.ReadElementContentAsString("Description", String.Empty); |
910 | } | 911 | } |
911 | 912 | ||
912 | private static void ProcessTIEveryonePermissions(TaskInventoryItem item, XmlTextReader reader) | 913 | private static void ProcessTIEveryonePermissions(TaskInventoryItem item, XmlReader reader) |
913 | { | 914 | { |
914 | item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty); | 915 | item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty); |
915 | } | 916 | } |
916 | 917 | ||
917 | private static void ProcessTIFlags(TaskInventoryItem item, XmlTextReader reader) | 918 | private static void ProcessTIFlags(TaskInventoryItem item, XmlReader reader) |
918 | { | 919 | { |
919 | item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); | 920 | item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); |
920 | } | 921 | } |
921 | 922 | ||
922 | private static void ProcessTIGroupID(TaskInventoryItem item, XmlTextReader reader) | 923 | private static void ProcessTIGroupID(TaskInventoryItem item, XmlReader reader) |
923 | { | 924 | { |
924 | item.GroupID = Util.ReadUUID(reader, "GroupID"); | 925 | item.GroupID = Util.ReadUUID(reader, "GroupID"); |
925 | } | 926 | } |
926 | 927 | ||
927 | private static void ProcessTIGroupPermissions(TaskInventoryItem item, XmlTextReader reader) | 928 | private static void ProcessTIGroupPermissions(TaskInventoryItem item, XmlReader reader) |
928 | { | 929 | { |
929 | item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty); | 930 | item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty); |
930 | } | 931 | } |
931 | 932 | ||
932 | private static void ProcessTIInvType(TaskInventoryItem item, XmlTextReader reader) | 933 | private static void ProcessTIInvType(TaskInventoryItem item, XmlReader reader) |
933 | { | 934 | { |
934 | item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); | 935 | item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); |
935 | } | 936 | } |
936 | 937 | ||
937 | private static void ProcessTIItemID(TaskInventoryItem item, XmlTextReader reader) | 938 | private static void ProcessTIItemID(TaskInventoryItem item, XmlReader reader) |
938 | { | 939 | { |
939 | item.ItemID = Util.ReadUUID(reader, "ItemID"); | 940 | item.ItemID = Util.ReadUUID(reader, "ItemID"); |
940 | } | 941 | } |
941 | 942 | ||
942 | private static void ProcessTIOldItemID(TaskInventoryItem item, XmlTextReader reader) | 943 | private static void ProcessTIOldItemID(TaskInventoryItem item, XmlReader reader) |
943 | { | 944 | { |
944 | item.OldItemID = Util.ReadUUID(reader, "OldItemID"); | 945 | item.OldItemID = Util.ReadUUID(reader, "OldItemID"); |
945 | } | 946 | } |
946 | 947 | ||
947 | private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlTextReader reader) | 948 | private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlReader reader) |
948 | { | 949 | { |
949 | item.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); | 950 | item.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); |
950 | } | 951 | } |
951 | 952 | ||
952 | private static void ProcessTIName(TaskInventoryItem item, XmlTextReader reader) | 953 | private static void ProcessTIName(TaskInventoryItem item, XmlReader reader) |
953 | { | 954 | { |
954 | item.Name = reader.ReadElementContentAsString("Name", String.Empty); | 955 | item.Name = reader.ReadElementContentAsString("Name", String.Empty); |
955 | } | 956 | } |
956 | 957 | ||
957 | private static void ProcessTINextPermissions(TaskInventoryItem item, XmlTextReader reader) | 958 | private static void ProcessTINextPermissions(TaskInventoryItem item, XmlReader reader) |
958 | { | 959 | { |
959 | item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); | 960 | item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); |
960 | } | 961 | } |
961 | 962 | ||
962 | private static void ProcessTIOwnerID(TaskInventoryItem item, XmlTextReader reader) | 963 | private static void ProcessTIOwnerID(TaskInventoryItem item, XmlReader reader) |
963 | { | 964 | { |
964 | item.OwnerID = Util.ReadUUID(reader, "OwnerID"); | 965 | item.OwnerID = Util.ReadUUID(reader, "OwnerID"); |
965 | } | 966 | } |
966 | 967 | ||
967 | private static void ProcessTICurrentPermissions(TaskInventoryItem item, XmlTextReader reader) | 968 | private static void ProcessTICurrentPermissions(TaskInventoryItem item, XmlReader reader) |
968 | { | 969 | { |
969 | item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); | 970 | item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); |
970 | } | 971 | } |
971 | 972 | ||
972 | private static void ProcessTIParentID(TaskInventoryItem item, XmlTextReader reader) | 973 | private static void ProcessTIParentID(TaskInventoryItem item, XmlReader reader) |
973 | { | 974 | { |
974 | item.ParentID = Util.ReadUUID(reader, "ParentID"); | 975 | item.ParentID = Util.ReadUUID(reader, "ParentID"); |
975 | } | 976 | } |
976 | 977 | ||
977 | private static void ProcessTIParentPartID(TaskInventoryItem item, XmlTextReader reader) | 978 | private static void ProcessTIParentPartID(TaskInventoryItem item, XmlReader reader) |
978 | { | 979 | { |
979 | item.ParentPartID = Util.ReadUUID(reader, "ParentPartID"); | 980 | item.ParentPartID = Util.ReadUUID(reader, "ParentPartID"); |
980 | } | 981 | } |
981 | 982 | ||
982 | private static void ProcessTIPermsGranter(TaskInventoryItem item, XmlTextReader reader) | 983 | private static void ProcessTIPermsGranter(TaskInventoryItem item, XmlReader reader) |
983 | { | 984 | { |
984 | item.PermsGranter = Util.ReadUUID(reader, "PermsGranter"); | 985 | item.PermsGranter = Util.ReadUUID(reader, "PermsGranter"); |
985 | } | 986 | } |
986 | 987 | ||
987 | private static void ProcessTIPermsMask(TaskInventoryItem item, XmlTextReader reader) | 988 | private static void ProcessTIPermsMask(TaskInventoryItem item, XmlReader reader) |
988 | { | 989 | { |
989 | item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty); | 990 | item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty); |
990 | } | 991 | } |
991 | 992 | ||
992 | private static void ProcessTIType(TaskInventoryItem item, XmlTextReader reader) | 993 | private static void ProcessTIType(TaskInventoryItem item, XmlReader reader) |
993 | { | 994 | { |
994 | item.Type = reader.ReadElementContentAsInt("Type", String.Empty); | 995 | item.Type = reader.ReadElementContentAsInt("Type", String.Empty); |
995 | } | 996 | } |
996 | 997 | ||
997 | private static void ProcessTIOwnerChanged(TaskInventoryItem item, XmlTextReader reader) | 998 | private static void ProcessTIOwnerChanged(TaskInventoryItem item, XmlReader reader) |
998 | { | 999 | { |
999 | item.OwnerChanged = Util.ReadBoolean(reader); | 1000 | item.OwnerChanged = Util.ReadBoolean(reader); |
1000 | } | 1001 | } |
@@ -1002,243 +1003,243 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1002 | #endregion | 1003 | #endregion |
1003 | 1004 | ||
1004 | #region ShapeXmlProcessors | 1005 | #region ShapeXmlProcessors |
1005 | private static void ProcessShpProfileCurve(PrimitiveBaseShape shp, XmlTextReader reader) | 1006 | private static void ProcessShpProfileCurve(PrimitiveBaseShape shp, XmlReader reader) |
1006 | { | 1007 | { |
1007 | shp.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty); | 1008 | shp.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty); |
1008 | } | 1009 | } |
1009 | 1010 | ||
1010 | private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1011 | private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlReader reader) |
1011 | { | 1012 | { |
1012 | byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry")); | 1013 | byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry")); |
1013 | shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length); | 1014 | shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length); |
1014 | } | 1015 | } |
1015 | 1016 | ||
1016 | private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlTextReader reader) | 1017 | private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlReader reader) |
1017 | { | 1018 | { |
1018 | shp.ExtraParams = Convert.FromBase64String(reader.ReadElementString("ExtraParams")); | 1019 | shp.ExtraParams = Convert.FromBase64String(reader.ReadElementString("ExtraParams")); |
1019 | } | 1020 | } |
1020 | 1021 | ||
1021 | private static void ProcessShpPathBegin(PrimitiveBaseShape shp, XmlTextReader reader) | 1022 | private static void ProcessShpPathBegin(PrimitiveBaseShape shp, XmlReader reader) |
1022 | { | 1023 | { |
1023 | shp.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty); | 1024 | shp.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty); |
1024 | } | 1025 | } |
1025 | 1026 | ||
1026 | private static void ProcessShpPathCurve(PrimitiveBaseShape shp, XmlTextReader reader) | 1027 | private static void ProcessShpPathCurve(PrimitiveBaseShape shp, XmlReader reader) |
1027 | { | 1028 | { |
1028 | shp.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty); | 1029 | shp.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty); |
1029 | } | 1030 | } |
1030 | 1031 | ||
1031 | private static void ProcessShpPathEnd(PrimitiveBaseShape shp, XmlTextReader reader) | 1032 | private static void ProcessShpPathEnd(PrimitiveBaseShape shp, XmlReader reader) |
1032 | { | 1033 | { |
1033 | shp.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty); | 1034 | shp.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty); |
1034 | } | 1035 | } |
1035 | 1036 | ||
1036 | private static void ProcessShpPathRadiusOffset(PrimitiveBaseShape shp, XmlTextReader reader) | 1037 | private static void ProcessShpPathRadiusOffset(PrimitiveBaseShape shp, XmlReader reader) |
1037 | { | 1038 | { |
1038 | shp.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty); | 1039 | shp.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty); |
1039 | } | 1040 | } |
1040 | 1041 | ||
1041 | private static void ProcessShpPathRevolutions(PrimitiveBaseShape shp, XmlTextReader reader) | 1042 | private static void ProcessShpPathRevolutions(PrimitiveBaseShape shp, XmlReader reader) |
1042 | { | 1043 | { |
1043 | shp.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty); | 1044 | shp.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty); |
1044 | } | 1045 | } |
1045 | 1046 | ||
1046 | private static void ProcessShpPathScaleX(PrimitiveBaseShape shp, XmlTextReader reader) | 1047 | private static void ProcessShpPathScaleX(PrimitiveBaseShape shp, XmlReader reader) |
1047 | { | 1048 | { |
1048 | shp.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty); | 1049 | shp.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty); |
1049 | } | 1050 | } |
1050 | 1051 | ||
1051 | private static void ProcessShpPathScaleY(PrimitiveBaseShape shp, XmlTextReader reader) | 1052 | private static void ProcessShpPathScaleY(PrimitiveBaseShape shp, XmlReader reader) |
1052 | { | 1053 | { |
1053 | shp.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty); | 1054 | shp.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty); |
1054 | } | 1055 | } |
1055 | 1056 | ||
1056 | private static void ProcessShpPathShearX(PrimitiveBaseShape shp, XmlTextReader reader) | 1057 | private static void ProcessShpPathShearX(PrimitiveBaseShape shp, XmlReader reader) |
1057 | { | 1058 | { |
1058 | shp.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty); | 1059 | shp.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty); |
1059 | } | 1060 | } |
1060 | 1061 | ||
1061 | private static void ProcessShpPathShearY(PrimitiveBaseShape shp, XmlTextReader reader) | 1062 | private static void ProcessShpPathShearY(PrimitiveBaseShape shp, XmlReader reader) |
1062 | { | 1063 | { |
1063 | shp.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty); | 1064 | shp.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty); |
1064 | } | 1065 | } |
1065 | 1066 | ||
1066 | private static void ProcessShpPathSkew(PrimitiveBaseShape shp, XmlTextReader reader) | 1067 | private static void ProcessShpPathSkew(PrimitiveBaseShape shp, XmlReader reader) |
1067 | { | 1068 | { |
1068 | shp.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty); | 1069 | shp.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty); |
1069 | } | 1070 | } |
1070 | 1071 | ||
1071 | private static void ProcessShpPathTaperX(PrimitiveBaseShape shp, XmlTextReader reader) | 1072 | private static void ProcessShpPathTaperX(PrimitiveBaseShape shp, XmlReader reader) |
1072 | { | 1073 | { |
1073 | shp.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty); | 1074 | shp.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty); |
1074 | } | 1075 | } |
1075 | 1076 | ||
1076 | private static void ProcessShpPathTaperY(PrimitiveBaseShape shp, XmlTextReader reader) | 1077 | private static void ProcessShpPathTaperY(PrimitiveBaseShape shp, XmlReader reader) |
1077 | { | 1078 | { |
1078 | shp.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty); | 1079 | shp.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty); |
1079 | } | 1080 | } |
1080 | 1081 | ||
1081 | private static void ProcessShpPathTwist(PrimitiveBaseShape shp, XmlTextReader reader) | 1082 | private static void ProcessShpPathTwist(PrimitiveBaseShape shp, XmlReader reader) |
1082 | { | 1083 | { |
1083 | shp.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty); | 1084 | shp.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty); |
1084 | } | 1085 | } |
1085 | 1086 | ||
1086 | private static void ProcessShpPathTwistBegin(PrimitiveBaseShape shp, XmlTextReader reader) | 1087 | private static void ProcessShpPathTwistBegin(PrimitiveBaseShape shp, XmlReader reader) |
1087 | { | 1088 | { |
1088 | shp.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty); | 1089 | shp.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty); |
1089 | } | 1090 | } |
1090 | 1091 | ||
1091 | private static void ProcessShpPCode(PrimitiveBaseShape shp, XmlTextReader reader) | 1092 | private static void ProcessShpPCode(PrimitiveBaseShape shp, XmlReader reader) |
1092 | { | 1093 | { |
1093 | shp.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty); | 1094 | shp.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty); |
1094 | } | 1095 | } |
1095 | 1096 | ||
1096 | private static void ProcessShpProfileBegin(PrimitiveBaseShape shp, XmlTextReader reader) | 1097 | private static void ProcessShpProfileBegin(PrimitiveBaseShape shp, XmlReader reader) |
1097 | { | 1098 | { |
1098 | shp.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty); | 1099 | shp.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty); |
1099 | } | 1100 | } |
1100 | 1101 | ||
1101 | private static void ProcessShpProfileEnd(PrimitiveBaseShape shp, XmlTextReader reader) | 1102 | private static void ProcessShpProfileEnd(PrimitiveBaseShape shp, XmlReader reader) |
1102 | { | 1103 | { |
1103 | shp.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty); | 1104 | shp.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty); |
1104 | } | 1105 | } |
1105 | 1106 | ||
1106 | private static void ProcessShpProfileHollow(PrimitiveBaseShape shp, XmlTextReader reader) | 1107 | private static void ProcessShpProfileHollow(PrimitiveBaseShape shp, XmlReader reader) |
1107 | { | 1108 | { |
1108 | shp.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty); | 1109 | shp.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty); |
1109 | } | 1110 | } |
1110 | 1111 | ||
1111 | private static void ProcessShpScale(PrimitiveBaseShape shp, XmlTextReader reader) | 1112 | private static void ProcessShpScale(PrimitiveBaseShape shp, XmlReader reader) |
1112 | { | 1113 | { |
1113 | shp.Scale = Util.ReadVector(reader, "Scale"); | 1114 | shp.Scale = Util.ReadVector(reader, "Scale"); |
1114 | } | 1115 | } |
1115 | 1116 | ||
1116 | private static void ProcessShpState(PrimitiveBaseShape shp, XmlTextReader reader) | 1117 | private static void ProcessShpState(PrimitiveBaseShape shp, XmlReader reader) |
1117 | { | 1118 | { |
1118 | shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty); | 1119 | shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty); |
1119 | } | 1120 | } |
1120 | 1121 | ||
1121 | private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlTextReader reader) | 1122 | private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlReader reader) |
1122 | { | 1123 | { |
1123 | shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty); | 1124 | shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty); |
1124 | } | 1125 | } |
1125 | 1126 | ||
1126 | private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlTextReader reader) | 1127 | private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlReader reader) |
1127 | { | 1128 | { |
1128 | shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape"); | 1129 | shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape"); |
1129 | } | 1130 | } |
1130 | 1131 | ||
1131 | private static void ProcessShpHollowShape(PrimitiveBaseShape shp, XmlTextReader reader) | 1132 | private static void ProcessShpHollowShape(PrimitiveBaseShape shp, XmlReader reader) |
1132 | { | 1133 | { |
1133 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); | 1134 | shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); |
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlTextReader reader) | 1137 | private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) |
1137 | { | 1138 | { |
1138 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); | 1139 | shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); |
1139 | } | 1140 | } |
1140 | 1141 | ||
1141 | private static void ProcessShpSculptType(PrimitiveBaseShape shp, XmlTextReader reader) | 1142 | private static void ProcessShpSculptType(PrimitiveBaseShape shp, XmlReader reader) |
1142 | { | 1143 | { |
1143 | shp.SculptType = (byte)reader.ReadElementContentAsInt("SculptType", String.Empty); | 1144 | shp.SculptType = (byte)reader.ReadElementContentAsInt("SculptType", String.Empty); |
1144 | } | 1145 | } |
1145 | 1146 | ||
1146 | private static void ProcessShpFlexiSoftness(PrimitiveBaseShape shp, XmlTextReader reader) | 1147 | private static void ProcessShpFlexiSoftness(PrimitiveBaseShape shp, XmlReader reader) |
1147 | { | 1148 | { |
1148 | shp.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty); | 1149 | shp.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty); |
1149 | } | 1150 | } |
1150 | 1151 | ||
1151 | private static void ProcessShpFlexiTension(PrimitiveBaseShape shp, XmlTextReader reader) | 1152 | private static void ProcessShpFlexiTension(PrimitiveBaseShape shp, XmlReader reader) |
1152 | { | 1153 | { |
1153 | shp.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty); | 1154 | shp.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty); |
1154 | } | 1155 | } |
1155 | 1156 | ||
1156 | private static void ProcessShpFlexiDrag(PrimitiveBaseShape shp, XmlTextReader reader) | 1157 | private static void ProcessShpFlexiDrag(PrimitiveBaseShape shp, XmlReader reader) |
1157 | { | 1158 | { |
1158 | shp.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty); | 1159 | shp.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty); |
1159 | } | 1160 | } |
1160 | 1161 | ||
1161 | private static void ProcessShpFlexiGravity(PrimitiveBaseShape shp, XmlTextReader reader) | 1162 | private static void ProcessShpFlexiGravity(PrimitiveBaseShape shp, XmlReader reader) |
1162 | { | 1163 | { |
1163 | shp.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty); | 1164 | shp.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty); |
1164 | } | 1165 | } |
1165 | 1166 | ||
1166 | private static void ProcessShpFlexiWind(PrimitiveBaseShape shp, XmlTextReader reader) | 1167 | private static void ProcessShpFlexiWind(PrimitiveBaseShape shp, XmlReader reader) |
1167 | { | 1168 | { |
1168 | shp.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty); | 1169 | shp.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty); |
1169 | } | 1170 | } |
1170 | 1171 | ||
1171 | private static void ProcessShpFlexiForceX(PrimitiveBaseShape shp, XmlTextReader reader) | 1172 | private static void ProcessShpFlexiForceX(PrimitiveBaseShape shp, XmlReader reader) |
1172 | { | 1173 | { |
1173 | shp.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty); | 1174 | shp.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty); |
1174 | } | 1175 | } |
1175 | 1176 | ||
1176 | private static void ProcessShpFlexiForceY(PrimitiveBaseShape shp, XmlTextReader reader) | 1177 | private static void ProcessShpFlexiForceY(PrimitiveBaseShape shp, XmlReader reader) |
1177 | { | 1178 | { |
1178 | shp.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty); | 1179 | shp.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty); |
1179 | } | 1180 | } |
1180 | 1181 | ||
1181 | private static void ProcessShpFlexiForceZ(PrimitiveBaseShape shp, XmlTextReader reader) | 1182 | private static void ProcessShpFlexiForceZ(PrimitiveBaseShape shp, XmlReader reader) |
1182 | { | 1183 | { |
1183 | shp.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty); | 1184 | shp.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty); |
1184 | } | 1185 | } |
1185 | 1186 | ||
1186 | private static void ProcessShpLightColorR(PrimitiveBaseShape shp, XmlTextReader reader) | 1187 | private static void ProcessShpLightColorR(PrimitiveBaseShape shp, XmlReader reader) |
1187 | { | 1188 | { |
1188 | shp.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty); | 1189 | shp.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty); |
1189 | } | 1190 | } |
1190 | 1191 | ||
1191 | private static void ProcessShpLightColorG(PrimitiveBaseShape shp, XmlTextReader reader) | 1192 | private static void ProcessShpLightColorG(PrimitiveBaseShape shp, XmlReader reader) |
1192 | { | 1193 | { |
1193 | shp.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty); | 1194 | shp.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty); |
1194 | } | 1195 | } |
1195 | 1196 | ||
1196 | private static void ProcessShpLightColorB(PrimitiveBaseShape shp, XmlTextReader reader) | 1197 | private static void ProcessShpLightColorB(PrimitiveBaseShape shp, XmlReader reader) |
1197 | { | 1198 | { |
1198 | shp.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty); | 1199 | shp.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty); |
1199 | } | 1200 | } |
1200 | 1201 | ||
1201 | private static void ProcessShpLightColorA(PrimitiveBaseShape shp, XmlTextReader reader) | 1202 | private static void ProcessShpLightColorA(PrimitiveBaseShape shp, XmlReader reader) |
1202 | { | 1203 | { |
1203 | shp.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty); | 1204 | shp.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty); |
1204 | } | 1205 | } |
1205 | 1206 | ||
1206 | private static void ProcessShpLightRadius(PrimitiveBaseShape shp, XmlTextReader reader) | 1207 | private static void ProcessShpLightRadius(PrimitiveBaseShape shp, XmlReader reader) |
1207 | { | 1208 | { |
1208 | shp.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty); | 1209 | shp.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty); |
1209 | } | 1210 | } |
1210 | 1211 | ||
1211 | private static void ProcessShpLightCutoff(PrimitiveBaseShape shp, XmlTextReader reader) | 1212 | private static void ProcessShpLightCutoff(PrimitiveBaseShape shp, XmlReader reader) |
1212 | { | 1213 | { |
1213 | shp.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty); | 1214 | shp.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty); |
1214 | } | 1215 | } |
1215 | 1216 | ||
1216 | private static void ProcessShpLightFalloff(PrimitiveBaseShape shp, XmlTextReader reader) | 1217 | private static void ProcessShpLightFalloff(PrimitiveBaseShape shp, XmlReader reader) |
1217 | { | 1218 | { |
1218 | shp.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty); | 1219 | shp.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty); |
1219 | } | 1220 | } |
1220 | 1221 | ||
1221 | private static void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlTextReader reader) | 1222 | private static void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlReader reader) |
1222 | { | 1223 | { |
1223 | shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty); | 1224 | shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty); |
1224 | } | 1225 | } |
1225 | 1226 | ||
1226 | private static void ProcessShpFlexiEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1227 | private static void ProcessShpFlexiEntry(PrimitiveBaseShape shp, XmlReader reader) |
1227 | { | 1228 | { |
1228 | shp.FlexiEntry = Util.ReadBoolean(reader); | 1229 | shp.FlexiEntry = Util.ReadBoolean(reader); |
1229 | } | 1230 | } |
1230 | 1231 | ||
1231 | private static void ProcessShpLightEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1232 | private static void ProcessShpLightEntry(PrimitiveBaseShape shp, XmlReader reader) |
1232 | { | 1233 | { |
1233 | shp.LightEntry = Util.ReadBoolean(reader); | 1234 | shp.LightEntry = Util.ReadBoolean(reader); |
1234 | } | 1235 | } |
1235 | 1236 | ||
1236 | private static void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlTextReader reader) | 1237 | private static void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlReader reader) |
1237 | { | 1238 | { |
1238 | shp.SculptEntry = Util.ReadBoolean(reader); | 1239 | shp.SculptEntry = Util.ReadBoolean(reader); |
1239 | } | 1240 | } |
1240 | 1241 | ||
1241 | private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlTextReader reader) | 1242 | private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader) |
1242 | { | 1243 | { |
1243 | string value = reader.ReadElementContentAsString("Media", String.Empty); | 1244 | string value = reader.ReadElementContentAsString("Media", String.Empty); |
1244 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | 1245 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); |
@@ -1590,7 +1591,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1590 | } | 1591 | } |
1591 | } | 1592 | } |
1592 | 1593 | ||
1593 | public static SceneObjectPart Xml2ToSOP(XmlTextReader reader) | 1594 | public static SceneObjectPart Xml2ToSOP(XmlReader reader) |
1594 | { | 1595 | { |
1595 | SceneObjectPart obj = new SceneObjectPart(); | 1596 | SceneObjectPart obj = new SceneObjectPart(); |
1596 | 1597 | ||
@@ -1611,7 +1612,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1611 | return obj; | 1612 | return obj; |
1612 | } | 1613 | } |
1613 | 1614 | ||
1614 | public static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) | 1615 | public static TaskInventoryDictionary ReadTaskInventory(XmlReader reader, string name) |
1615 | { | 1616 | { |
1616 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); | 1617 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); |
1617 | 1618 | ||
@@ -1652,7 +1653,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1652 | /// <param name="name">The name of the xml element containing the shape</param> | 1653 | /// <param name="name">The name of the xml element containing the shape</param> |
1653 | /// <param name="errors">a list containing the failing node names. If no failures then null.</param> | 1654 | /// <param name="errors">a list containing the failing node names. If no failures then null.</param> |
1654 | /// <returns>The shape parsed</returns> | 1655 | /// <returns>The shape parsed</returns> |
1655 | public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out List<string> errorNodeNames) | 1656 | public static PrimitiveBaseShape ReadShape(XmlReader reader, string name, out List<string> errorNodeNames) |
1656 | { | 1657 | { |
1657 | List<string> internalErrorNodeNames = null; | 1658 | List<string> internalErrorNodeNames = null; |
1658 | 1659 | ||