aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-08-29 19:08:23 +0100
committerJustin Clark-Casey (justincc)2014-08-29 19:08:23 +0100
commit1b75ec5647afeb9fbdad78f70c0c90a829bba076 (patch)
tree500744dddfc3f4238391d9e04ca431669f742ce5 /OpenSim/Framework/Serialization/External/LandDataSerializer.cs
parentFix recent regression test TestDeserializeXmlObjectWithOtherParts() which was... (diff)
downloadopensim-SC_OLD-1b75ec5647afeb9fbdad78f70c0c90a829bba076.zip
opensim-SC_OLD-1b75ec5647afeb9fbdad78f70c0c90a829bba076.tar.gz
opensim-SC_OLD-1b75ec5647afeb9fbdad78f70c0c90a829bba076.tar.bz2
opensim-SC_OLD-1b75ec5647afeb9fbdad78f70c0c90a829bba076.tar.xz
Ignore whitespace when reading serialized XML objects.
This was previously effectively being done by XmlDocument in the multiple passes through the XML. This change tells XmlReader to ignore whitespace. This also means changing arguments to use XmlReader instead of XmlTextReader (a descendent of XmlReader) directly. XmlReader.Create() has been the recommend way to create XML readers since .NET 2.0 as per MS SDK and is the only way to specific ignore whitespace settings.
Diffstat (limited to 'OpenSim/Framework/Serialization/External/LandDataSerializer.cs')
-rw-r--r--OpenSim/Framework/Serialization/External/LandDataSerializer.cs10
1 files changed, 5 insertions, 5 deletions
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 {