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

◆ WriteDocType() [1/2]

override void System.Xml.XmlWellFormedWriter.WriteDocType ( string name,
string pubid,
string sysid,
string subset )
inline

Definition at line 1377 of file XmlWellFormedWriter.cs.

1378 {
1379 try
1380 {
1381 if (name == null || name.Length == 0)
1382 {
1384 }
1385 XmlConvert.VerifyQName(name, ExceptionType.XmlException);
1386 if (_conformanceLevel == ConformanceLevel.Fragment)
1387 {
1389 }
1390 AdvanceState(Token.Dtd);
1391 if (_dtdWritten)
1392 {
1393 _currentState = State.Error;
1395 }
1396 if (_conformanceLevel == ConformanceLevel.Auto)
1397 {
1398 _conformanceLevel = ConformanceLevel.Document;
1400 }
1401 if (_checkCharacters)
1402 {
1403 int invCharIndex;
1404 if (pubid != null && (invCharIndex = XmlCharType.IsPublicId(pubid)) >= 0)
1405 {
1407 object[] args = XmlException.BuildCharExceptionArgs(pubid, invCharIndex);
1409 }
1410 if (sysid != null && (invCharIndex = XmlCharType.IsOnlyCharData(sysid)) >= 0)
1411 {
1413 object[] args = XmlException.BuildCharExceptionArgs(sysid, invCharIndex);
1415 }
1416 if (subset != null && (invCharIndex = XmlCharType.IsOnlyCharData(subset)) >= 0)
1417 {
1419 object[] args = XmlException.BuildCharExceptionArgs(subset, invCharIndex);
1421 }
1422 }
1424 _dtdWritten = true;
1425 }
1426 catch
1427 {
1428 _currentState = State.Error;
1429 throw;
1430 }
1431 }
static string Xml_EmptyName
Definition SR.cs:292
static string Xml_DtdNotAllowedInFragment
Definition SR.cs:164
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Xml_InvalidCharacter
Definition SR.cs:110
static string Xml_DtdAlreadyWritten
Definition SR.cs:330
Definition SR.cs:7
static readonly State[] s_stateTableDocument
void WriteDocType(string name, string? pubid, string? sysid, string? subset)

References System.Xml.XmlWellFormedWriter._checkCharacters, System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._dtdWritten, System.Xml.XmlWellFormedWriter._stateTable, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWellFormedWriter.AdvanceState(), System.Xml.ArgumentException, System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.Dictionary, System.SR.Format(), System.Xml.XmlCharType.IsOnlyCharData(), System.Xml.XmlCharType.IsPublicId(), System.Xml.XmlWellFormedWriter.s_stateTableDocument, System.Xml.XmlConvert.VerifyQName(), System.Xml.XmlWriter.WriteDocType(), System.SR.Xml_DtdAlreadyWritten, System.SR.Xml_DtdNotAllowedInFragment, System.SR.Xml_EmptyName, and System.SR.Xml_InvalidCharacter.