diff options
author | UbitUmarov | 2018-01-05 12:24:07 +0000 |
---|---|---|
committer | UbitUmarov | 2018-01-05 12:24:07 +0000 |
commit | 89a690c11f8c7b6bbe0b6339e79a64d1ae428aec (patch) | |
tree | eb039c92222bf22359a20ecb5294b8ab1b2a38eb /OpenSim/Framework/PhysicsInertia.cs | |
parent | don't be bad Jenkins.. (diff) | |
download | opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.zip opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.tar.gz opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.tar.bz2 opensim-SC_OLD-89a690c11f8c7b6bbe0b6339e79a64d1ae428aec.tar.xz |
a few more xml things
Diffstat (limited to 'OpenSim/Framework/PhysicsInertia.cs')
-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; |