remove those xml things no longer needed on .net >4.5.2

httptests
UbitUmarov 2018-01-17 04:18:43 +00:00
parent 2c8251d450
commit 029d6e40f6
20 changed files with 3 additions and 40 deletions

View File

@ -83,8 +83,6 @@ namespace OpenSim.Framework.Capabilities
{
using (XmlTextReader reader = new XmlTextReader(st))
{
reader.ProhibitDtd = true;
reader.Read();
SkipWS(reader);

View File

@ -193,8 +193,6 @@ namespace OpenSim.Framework
using(MemoryStream ms = new MemoryStream(enc.GetBytes(text)))
using(XmlTextReader xreader = new XmlTextReader(ms))
{
xreader.ProhibitDtd = true;
v = new PhysicsInertiaData();
v.FromXml2(xreader, out error);
}

View File

@ -1595,8 +1595,6 @@ namespace OpenSim.Framework
{
using (XmlTextReader xtr = new XmlTextReader(sr))
{
xtr.ProhibitDtd = true;
xtr.MoveToContent();
string type = xtr.GetAttribute("type");

View File

@ -221,7 +221,7 @@ namespace OpenSim.Framework.Serialization.External
using (StringWriter sw = new StringWriter())
using (XmlTextWriter writer = new XmlTextWriter(sw))
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true}))
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment}))
{
TransformXml(reader, writer, sceneName, homeURL, userService, scopeID);

View File

@ -178,7 +178,6 @@ namespace OpenSim.Framework.Serialization.External
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
{
reader.ProhibitDtd = true;
reader.ReadStartElement("LandData");
ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader);

View File

@ -63,7 +63,6 @@ namespace OpenSim.Framework.Serialization.External
StringReader sr = new StringReader(serializedSettings);
XmlTextReader xtr = new XmlTextReader(sr);
xtr.ProhibitDtd = true;
xtr.ReadStartElement("RegionSettings");

View File

@ -202,8 +202,6 @@ namespace OpenSim.Framework.Serialization.External
using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization)))
{
reader.ProhibitDtd = true;
reader.ReadStartElement("InventoryItem");
ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>(

View File

@ -54,8 +54,6 @@ namespace OpenSim.Framework.Servers.HttpServer
TRequest deserial;
using (XmlTextReader xmlReader = new XmlTextReader(request))
{
xmlReader.ProhibitDtd = true;
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
deserial = (TRequest) deserializer.Deserialize(xmlReader);
}

View File

@ -210,8 +210,6 @@ namespace OpenSim.Framework.Servers.HttpServer
{
try
{
xmlReader.ProhibitDtd = true;
XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>));
deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader);
}
@ -271,8 +269,6 @@ namespace OpenSim.Framework.Servers.HttpServer
{
try
{
xmlReader.ProhibitDtd = true;
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
deserial = (TRequest)deserializer.Deserialize(xmlReader);
}

View File

@ -124,8 +124,6 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
{
using(XmlTextReader sr = new XmlTextReader(s))
{
sr.ProhibitDtd = true;
sr.ReadStartElement("BakedAppearance");
while(sr.LocalName == "BakedTexture")
{

View File

@ -1130,7 +1130,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
xtr.ProhibitDtd = true;
// Loaded metadata will be empty if no information exists in the archive
dearchivedScenes.LoadedCreationDateTime = 0;

View File

@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
StringReader sr = new StringReader(xml);
XmlTextReader reader = new XmlTextReader(sr);
reader.ProhibitDtd = true;
reader.ReadStartElement("assets");
reader.Read();

View File

@ -58,8 +58,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation
using (XmlTextReader reader = new XmlTextReader(path))
{
reader.ProhibitDtd = true;
XmlDocument doc = new XmlDocument();
doc.XmlResolver = null;

View File

@ -593,7 +593,6 @@ namespace OpenSim.Region.Framework.Scenes
UTF8Encoding enc = new UTF8Encoding();
MemoryStream ms = new MemoryStream(enc.GetBytes(text));
XmlTextReader xreader = new XmlTextReader(ms);
xreader.ProhibitDtd = true;
SOPVehicle v = new SOPVehicle();
bool error;

View File

@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes
{
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
{
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true }))
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment}))
{
reader.Read();
bool isSingleObject = reader.Name != "CoalescedObject";

View File

@ -133,8 +133,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
{
using (XmlTextReader reader = new XmlTextReader(sr))
{
reader.ProhibitDtd = true;
reader.MoveToContent(); // skip possible xml declaration
if (reader.Name != "CoalescedObject")

View File

@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData);
using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null))
{
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true }))
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment}))
{
try
{
@ -271,11 +271,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
using(StringReader sr = new StringReader(parts[0].OuterXml))
{
using(XmlTextReader reader = new XmlTextReader(sr))
{
reader.ProhibitDtd = true;
sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
}
}
// Then deal with the rest

View File

@ -57,7 +57,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
using(XmlTextReader reader = new XmlTextReader(fileName))
{
reader.WhitespaceHandling = WhitespaceHandling.None;
reader.ProhibitDtd = true;
doc.Load(reader);
}

View File

@ -199,11 +199,7 @@ namespace OpenSim.Region.Framework.Scenes
using(StringReader sr = new StringReader(data))
{
using(XmlTextReader reader = new XmlTextReader(sr))
{
reader.ProhibitDtd = true;
ReadXml(reader);
}
}
}

View File

@ -1147,10 +1147,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse())
using (Stream s = rsp.GetResponseStream())
using (XmlTextReader rdr = new XmlTextReader(s))
{
rdr.ProhibitDtd = true;
doc.Load(rdr);
}
}
catch (Exception e)
{