From 89a690c11f8c7b6bbe0b6339e79a64d1ae428aec Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 5 Jan 2018 12:24:07 +0000 Subject: a few more xml things --- OpenSim/Region/Framework/Scenes/TerrainChannel.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/TerrainChannel.cs') diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 89d78cf..1beca04 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs @@ -196,13 +196,15 @@ namespace OpenSim.Region.Framework.Scenes // ITerrainChannel.LoadFromXmlString() public void LoadFromXmlString(string data) { - StringReader sr = new StringReader(data); - XmlTextReader reader = new XmlTextReader(sr); - reader.Read(); - - ReadXml(reader); - reader.Close(); - sr.Close(); + using(StringReader sr = new StringReader(data)) + { + using(XmlTextReader reader = new XmlTextReader(sr)) + { + reader.DtdProcessing = DtdProcessing.Prohibit; + reader.XmlResolver = null; + ReadXml(reader); + } + } } // ITerrainChannel.Merge -- cgit v1.1