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

◆ ParseDoctypeDecl()

bool System.Xml.XmlTextReaderImpl.ParseDoctypeDecl ( )
inlineprivate

Definition at line 6184 of file XmlTextReaderImpl.cs.

6185 {
6186 if (_dtdProcessing == DtdProcessing.Prohibit)
6187 {
6188 ThrowWithoutLineInfo(_v1Compat ? System.SR.Xml_DtdIsProhibited : System.SR.Xml_DtdIsProhibitedEx);
6189 }
6190 while (_ps.charsUsed - _ps.charPos < 8)
6191 {
6192 if (ReadData() == 0)
6193 {
6194 Throw(System.SR.Xml_UnexpectedEOF, "DOCTYPE");
6195 }
6196 }
6197 if (!XmlConvert.StrEqual(_ps.chars, _ps.charPos, 7, "DOCTYPE"))
6198 {
6199 ThrowUnexpectedToken((!_rootElementParsed && _dtdInfo == null) ? "DOCTYPE" : "<!--");
6200 }
6201 if (!XmlCharType.IsWhiteSpace(_ps.chars[_ps.charPos + 7]))
6202 {
6204 }
6205 if (_dtdInfo != null)
6206 {
6208 }
6210 {
6212 }
6213 _ps.charPos += 8;
6214 EatWhitespaces(null);
6215 if (_dtdProcessing == DtdProcessing.Parse)
6216 {
6218 ParseDtd();
6220 _parsingFunction = ParsingFunction.ResetAttributesRootLevel;
6221 return true;
6222 }
6223 SkipDtd();
6224 return false;
6225 }
static string Xml_DtdIsProhibited
Definition SR.cs:158
static string Xml_MultipleDTDsProvided
Definition SR.cs:106
static string Xml_UnexpectedEOF
Definition SR.cs:36
static string Xml_DtdAfterRootElement
Definition SR.cs:154
Definition SR.cs:7
void SetLineInfo(int lineNo, int linePos)
int EatWhitespaces(StringBuilder sb)
void Throw(int pos, string res, string arg)
void ThrowUnexpectedToken(int pos, string expectedToken)

References System.Xml.XmlTextReaderImpl._curNode, System.Xml.XmlTextReaderImpl._dtdInfo, System.Xml.XmlTextReaderImpl._dtdProcessing, System.Xml.XmlTextReaderImpl._nextParsingFunction, System.Xml.XmlTextReaderImpl._parsingFunction, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._rootElementParsed, System.Xml.XmlTextReaderImpl._v1Compat, System.Xml.XmlTextReaderImpl.ParsingState.charPos, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.XmlTextReaderImpl.ParsingState.charsUsed, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.EatWhitespaces(), System.Xml.XmlCharType.IsWhiteSpace(), System.Xml.XmlTextReaderImpl.ParsingState.LineNo, System.Xml.XmlTextReaderImpl.ParsingState.LinePos, System.Xml.XmlTextReaderImpl.ParseDtd(), System.Xml.XmlTextReaderImpl.ReadData(), System.Xml.XmlTextReaderImpl.NodeData.SetLineInfo(), System.Xml.XmlTextReaderImpl.SkipDtd(), System.Xml.XmlConvert.StrEqual(), System.Xml.XmlTextReaderImpl.Throw(), System.Xml.XmlTextReaderImpl.ThrowExpectingWhitespace(), System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(), System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(), System.SR.Xml_DtdAfterRootElement, System.SR.Xml_DtdIsProhibited, System.SR.Xml_DtdIsProhibitedEx, System.SR.Xml_MultipleDTDsProvided, and System.SR.Xml_UnexpectedEOF.

Referenced by System.Xml.XmlTextReaderImpl.ParseDocumentContent().