fall back to a obsolete property since several monos in use (include our own) do not suporte the proper .net4.0 one
parent
89a690c11f
commit
eec3921800
|
@ -83,7 +83,7 @@ namespace OpenSim.Framework.Capabilities
|
||||||
{
|
{
|
||||||
using (XmlTextReader reader = new XmlTextReader(st))
|
using (XmlTextReader reader = new XmlTextReader(st))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
|
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|
|
@ -193,7 +193,7 @@ namespace OpenSim.Framework
|
||||||
using(MemoryStream ms = new MemoryStream(enc.GetBytes(text)))
|
using(MemoryStream ms = new MemoryStream(enc.GetBytes(text)))
|
||||||
using(XmlTextReader xreader = new XmlTextReader(ms))
|
using(XmlTextReader xreader = new XmlTextReader(ms))
|
||||||
{
|
{
|
||||||
xreader.DtdProcessing = DtdProcessing.Prohibit;
|
xreader.ProhibitDtd = true;
|
||||||
xreader.XmlResolver = null;
|
xreader.XmlResolver = null;
|
||||||
|
|
||||||
v = new PhysicsInertiaData();
|
v = new PhysicsInertiaData();
|
||||||
|
|
|
@ -1595,7 +1595,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
using (XmlTextReader xtr = new XmlTextReader(sr))
|
using (XmlTextReader xtr = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
xtr.DtdProcessing = DtdProcessing.Prohibit;
|
xtr.ProhibitDtd = true;
|
||||||
xtr.XmlResolver = null;
|
xtr.XmlResolver = null;
|
||||||
|
|
||||||
xtr.MoveToContent();
|
xtr.MoveToContent();
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
using (StringWriter sw = new StringWriter())
|
using (StringWriter sw = new StringWriter())
|
||||||
using (XmlTextWriter writer = new XmlTextWriter(sw))
|
using (XmlTextWriter writer = new XmlTextWriter(sw))
|
||||||
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
||||||
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }))
|
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true, XmlResolver = null }))
|
||||||
{
|
{
|
||||||
TransformXml(reader, writer, sceneName, homeURL, userService, scopeID);
|
TransformXml(reader, writer, sceneName, homeURL, userService, scopeID);
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
|
|
||||||
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
|
using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData)))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
reader.ReadStartElement("LandData");
|
reader.ReadStartElement("LandData");
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
|
|
||||||
StringReader sr = new StringReader(serializedSettings);
|
StringReader sr = new StringReader(serializedSettings);
|
||||||
XmlTextReader xtr = new XmlTextReader(sr);
|
XmlTextReader xtr = new XmlTextReader(sr);
|
||||||
xtr.DtdProcessing = DtdProcessing.Prohibit;
|
xtr.ProhibitDtd = true;
|
||||||
xtr.XmlResolver = null;
|
xtr.XmlResolver = null;
|
||||||
|
|
||||||
xtr.ReadStartElement("RegionSettings");
|
xtr.ReadStartElement("RegionSettings");
|
||||||
|
|
|
@ -202,7 +202,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
|
|
||||||
using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization)))
|
using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization)))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
|
|
||||||
reader.ReadStartElement("InventoryItem");
|
reader.ReadStartElement("InventoryItem");
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
TRequest deserial;
|
TRequest deserial;
|
||||||
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
||||||
{
|
{
|
||||||
xmlReader.DtdProcessing = DtdProcessing.Prohibit;
|
xmlReader.ProhibitDtd = true;
|
||||||
xmlReader.XmlResolver = null;
|
xmlReader.XmlResolver = null;
|
||||||
|
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
|
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
|
||||||
|
|
|
@ -210,7 +210,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xmlReader.DtdProcessing = DtdProcessing.Prohibit;
|
xmlReader.ProhibitDtd = true;
|
||||||
xmlReader.XmlResolver = null;
|
xmlReader.XmlResolver = null;
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>));
|
XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>));
|
||||||
deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader);
|
deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader);
|
||||||
|
@ -271,7 +271,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
xmlReader.DtdProcessing = DtdProcessing.Prohibit;
|
xmlReader.ProhibitDtd = true;
|
||||||
xmlReader.XmlResolver = null;
|
xmlReader.XmlResolver = null;
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
|
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
|
||||||
deserial = (TRequest)deserializer.Deserialize(xmlReader);
|
deserial = (TRequest)deserializer.Deserialize(xmlReader);
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
|
||||||
{
|
{
|
||||||
using(XmlTextReader sr = new XmlTextReader(s))
|
using(XmlTextReader sr = new XmlTextReader(s))
|
||||||
{
|
{
|
||||||
sr.DtdProcessing = DtdProcessing.Prohibit;
|
sr.ProhibitDtd = true;
|
||||||
sr.XmlResolver = null;
|
sr.XmlResolver = null;
|
||||||
sr.ReadStartElement("BakedAppearance");
|
sr.ReadStartElement("BakedAppearance");
|
||||||
while(sr.LocalName == "BakedTexture")
|
while(sr.LocalName == "BakedTexture")
|
||||||
|
|
|
@ -1130,7 +1130,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
|
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
|
||||||
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
|
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
|
||||||
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
|
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
|
||||||
xtr.DtdProcessing = DtdProcessing.Prohibit;
|
xtr.ProhibitDtd = true;
|
||||||
xtr.XmlResolver = null;
|
xtr.XmlResolver = null;
|
||||||
|
|
||||||
// Loaded metadata will be empty if no information exists in the archive
|
// Loaded metadata will be empty if no information exists in the archive
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
StringReader sr = new StringReader(xml);
|
StringReader sr = new StringReader(xml);
|
||||||
XmlTextReader reader = new XmlTextReader(sr);
|
XmlTextReader reader = new XmlTextReader(sr);
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
|
|
||||||
reader.ReadStartElement("assets");
|
reader.ReadStartElement("assets");
|
||||||
|
|
|
@ -720,6 +720,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||||
string xml = SceneObjectSerializer.ToOriginalXmlFormat(so);
|
string xml = SceneObjectSerializer.ToOriginalXmlFormat(so);
|
||||||
|
|
||||||
XmlTextReader xtr = new XmlTextReader(new StringReader(xml));
|
XmlTextReader xtr = new XmlTextReader(new StringReader(xml));
|
||||||
|
xtr.ProhibitDtd = true;
|
||||||
|
xtr.XmlResolver = null;
|
||||||
xtr.ReadStartElement("SceneObjectGroup");
|
xtr.ReadStartElement("SceneObjectGroup");
|
||||||
xtr.ReadStartElement("RootPart");
|
xtr.ReadStartElement("RootPart");
|
||||||
xtr.ReadStartElement("SceneObjectPart");
|
xtr.ReadStartElement("SceneObjectPart");
|
||||||
|
@ -831,6 +833,8 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
|
||||||
string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options);
|
string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options);
|
||||||
|
|
||||||
XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
|
XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
|
||||||
|
xtr.ProhibitDtd = true;
|
||||||
|
xtr.XmlResolver = null;
|
||||||
xtr.ReadStartElement("SceneObjectGroup");
|
xtr.ReadStartElement("SceneObjectGroup");
|
||||||
xtr.ReadStartElement("SceneObjectPart");
|
xtr.ReadStartElement("SceneObjectPart");
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
|
|
||||||
using (XmlTextReader reader = new XmlTextReader(path))
|
using (XmlTextReader reader = new XmlTextReader(path))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
doc.XmlResolver = null;
|
doc.XmlResolver = null;
|
||||||
|
|
|
@ -593,7 +593,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UTF8Encoding enc = new UTF8Encoding();
|
UTF8Encoding enc = new UTF8Encoding();
|
||||||
MemoryStream ms = new MemoryStream(enc.GetBytes(text));
|
MemoryStream ms = new MemoryStream(enc.GetBytes(text));
|
||||||
XmlTextReader xreader = new XmlTextReader(ms);
|
XmlTextReader xreader = new XmlTextReader(ms);
|
||||||
xreader.DtdProcessing = DtdProcessing.Prohibit;
|
xreader.ProhibitDtd = true;
|
||||||
xreader.XmlResolver = null;
|
xreader.XmlResolver = null;
|
||||||
|
|
||||||
SOPVehicle v = new SOPVehicle();
|
SOPVehicle v = new SOPVehicle();
|
||||||
|
|
|
@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
|
||||||
{
|
{
|
||||||
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }))
|
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true, XmlResolver = null }))
|
||||||
{
|
{
|
||||||
reader.Read();
|
reader.Read();
|
||||||
bool isSingleObject = reader.Name != "CoalescedObject";
|
bool isSingleObject = reader.Name != "CoalescedObject";
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
{
|
{
|
||||||
using (XmlTextReader reader = new XmlTextReader(sr))
|
using (XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
|
|
||||||
reader.MoveToContent(); // skip possible xml declaration
|
reader.MoveToContent(); // skip possible xml declaration
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData);
|
String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData);
|
||||||
using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null))
|
using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null))
|
||||||
{
|
{
|
||||||
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null }))
|
using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, ProhibitDtd = true, XmlResolver = null }))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
{
|
{
|
||||||
using(XmlTextReader reader = new XmlTextReader(sr))
|
using(XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
|
|
||||||
sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
|
sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader));
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
using(XmlTextReader reader = new XmlTextReader(fileName))
|
using(XmlTextReader reader = new XmlTextReader(fileName))
|
||||||
{
|
{
|
||||||
reader.WhitespaceHandling = WhitespaceHandling.None;
|
reader.WhitespaceHandling = WhitespaceHandling.None;
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
|
|
||||||
doc.Load(reader);
|
doc.Load(reader);
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
using(XmlTextReader reader = new XmlTextReader(sr))
|
using(XmlTextReader reader = new XmlTextReader(sr))
|
||||||
{
|
{
|
||||||
reader.DtdProcessing = DtdProcessing.Prohibit;
|
reader.ProhibitDtd = true;
|
||||||
reader.XmlResolver = null;
|
reader.XmlResolver = null;
|
||||||
ReadXml(reader);
|
ReadXml(reader);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1148,7 +1148,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
using (Stream s = rsp.GetResponseStream())
|
using (Stream s = rsp.GetResponseStream())
|
||||||
using (XmlTextReader rdr = new XmlTextReader(s))
|
using (XmlTextReader rdr = new XmlTextReader(s))
|
||||||
{
|
{
|
||||||
rdr.DtdProcessing = DtdProcessing.Prohibit;
|
rdr.ProhibitDtd = true;
|
||||||
rdr.XmlResolver = null;
|
rdr.XmlResolver = null;
|
||||||
doc.Load(rdr);
|
doc.Load(rdr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue