diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/PhysicsInertia.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Framework/PhysicsInertia.cs b/OpenSim/Framework/PhysicsInertia.cs index 6e15791..8a0e43e 100644 --- a/OpenSim/Framework/PhysicsInertia.cs +++ b/OpenSim/Framework/PhysicsInertia.cs | |||
@@ -187,16 +187,18 @@ namespace OpenSim.Framework | |||
187 | if (text == String.Empty) | 187 | if (text == String.Empty) |
188 | return null; | 188 | return null; |
189 | 189 | ||
190 | UTF8Encoding enc = new UTF8Encoding(); | ||
191 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); | ||
192 | XmlTextReader xreader = new XmlTextReader(ms); | ||
193 | |||
194 | PhysicsInertiaData v = new PhysicsInertiaData(); | ||
195 | bool error; | 190 | bool error; |
191 | PhysicsInertiaData v; | ||
192 | UTF8Encoding enc = new UTF8Encoding(); | ||
193 | using(MemoryStream ms = new MemoryStream(enc.GetBytes(text))) | ||
194 | using(XmlTextReader xreader = new XmlTextReader(ms)) | ||
195 | { | ||
196 | xreader.DtdProcessing = DtdProcessing.Prohibit; | ||
197 | xreader.XmlResolver = null; | ||
196 | 198 | ||
197 | v.FromXml2(xreader, out error); | 199 | v = new PhysicsInertiaData(); |
198 | 200 | v.FromXml2(xreader, out error); | |
199 | xreader.Close(); | 201 | } |
200 | 202 | ||
201 | if (error) | 203 | if (error) |
202 | return null; | 204 | return null; |