Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PushExternalEntityOrSubset()

void System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset ( string publicId,
string systemId,
Uri baseUri,
string entityName )
inlineprivate

Definition at line 7140 of file XmlTextReaderImpl.cs.

7141 {
7142 Uri uri;
7143 if (!string.IsNullOrEmpty(publicId))
7144 {
7145 try
7146 {
7147 uri = _xmlResolver.ResolveUri(baseUri, publicId);
7148 if (OpenAndPush(uri))
7149 {
7150 return;
7151 }
7152 }
7153 catch (Exception)
7154 {
7155 }
7156 }
7157 uri = _xmlResolver.ResolveUri(baseUri, systemId);
7158 try
7159 {
7160 if (OpenAndPush(uri))
7161 {
7162 return;
7163 }
7164 }
7165 catch (Exception ex2)
7166 {
7167 if (_v1Compat)
7168 {
7169 throw;
7170 }
7171 string message = ex2.Message;
7172 Throw(new XmlException((entityName == null) ? System.SR.Xml_ErrorOpeningExternalDtd : System.SR.Xml_ErrorOpeningExternalEntity, new string[2]
7173 {
7174 uri.ToString(),
7175 message
7176 }, ex2, 0, 0));
7177 }
7178 if (entityName == null)
7179 {
7181 {
7182 (publicId != null) ? publicId : string.Empty,
7183 systemId
7184 }, null);
7185 }
7186 else
7187 {
7188 Throw((_dtdProcessing == DtdProcessing.Ignore) ? System.SR.Xml_CannotResolveEntityDtdIgnored : System.SR.Xml_CannotResolveEntity, entityName);
7189 }
7190 }
static string Xml_ErrorOpeningExternalDtd
Definition SR.cs:168
static string Xml_CannotResolveExternalSubset
Definition SR.cs:146
static string Xml_CannotResolveEntityDtdIgnored
Definition SR.cs:144
Definition SR.cs:7
virtual Uri ResolveUri(Uri? baseUri, string? relativeUri)
void Throw(int pos, string res, string arg)

References System.Xml.XmlTextReaderImpl._dtdProcessing, System.Xml.XmlTextReaderImpl._v1Compat, System.Xml.XmlTextReaderImpl._xmlResolver, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.OpenAndPush(), System.Xml.XmlResolver.ResolveUri(), System.Xml.XmlTextReaderImpl.Throw(), System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(), System.Uri.ToString(), System.SR.Xml_CannotResolveEntity, System.SR.Xml_CannotResolveEntityDtdIgnored, System.SR.Xml_CannotResolveExternalSubset, System.SR.Xml_ErrorOpeningExternalDtd, System.SR.Xml_ErrorOpeningExternalEntity, and System.Xml.XmlException.

Referenced by System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(), and System.Xml.XmlTextReaderImpl.PushExternalEntity().