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

◆ ParseEndElement()

void System.Xml.XmlTextReaderImpl.ParseEndElement ( )
inlineprivate

Definition at line 4424 of file XmlTextReaderImpl.cs.

4425 {
4426 NodeData nodeData = _nodes[_index - 1];
4427 int length = nodeData.prefix.Length;
4428 int length2 = nodeData.localName.Length;
4429 while (_ps.charsUsed - _ps.charPos < length + length2 + 1 && ReadData() != 0)
4430 {
4431 }
4432 char[] chars = _ps.chars;
4433 int num;
4434 if (nodeData.prefix.Length == 0)
4435 {
4436 if (!XmlConvert.StrEqual(chars, _ps.charPos, length2, nodeData.localName))
4437 {
4439 }
4440 num = length2;
4441 }
4442 else
4443 {
4444 int num2 = _ps.charPos + length;
4445 if (!XmlConvert.StrEqual(chars, _ps.charPos, length, nodeData.prefix) || chars[num2] != ':' || !XmlConvert.StrEqual(chars, num2 + 1, length2, nodeData.localName))
4446 {
4448 }
4449 num = length2 + length + 1;
4450 }
4451 LineInfo lineInfo = new LineInfo(_ps.lineNo, _ps.LinePos);
4452 int num3;
4453 while (true)
4454 {
4455 num3 = _ps.charPos + num;
4456 chars = _ps.chars;
4457 if (num3 != _ps.charsUsed)
4458 {
4459 if (XmlCharType.IsNCNameSingleChar(chars[num3]) || chars[num3] == ':')
4460 {
4462 }
4463 if (chars[num3] != '>')
4464 {
4465 char c;
4466 while (XmlCharType.IsWhiteSpace(c = chars[num3]))
4467 {
4468 num3++;
4469 switch (c)
4470 {
4471 case '\n':
4472 OnNewLine(num3);
4473 break;
4474 case '\r':
4475 if (chars[num3] == '\n')
4476 {
4477 num3++;
4478 }
4479 else if (num3 == _ps.charsUsed && !_ps.isEof)
4480 {
4481 break;
4482 }
4483 OnNewLine(num3);
4484 break;
4485 }
4486 }
4487 }
4488 if (chars[num3] == '>')
4489 {
4490 break;
4491 }
4492 if (num3 != _ps.charsUsed)
4493 {
4495 }
4496 }
4497 if (ReadData() == 0)
4498 {
4500 }
4501 }
4502 _index--;
4504 nodeData.lineInfo = lineInfo;
4505 nodeData.type = XmlNodeType.EndElement;
4506 _ps.charPos = num3 + 1;
4507 _nextParsingFunction = ((_index > 0) ? _parsingFunction : ParsingFunction.DocumentContent);
4508 _parsingFunction = ParsingFunction.PopElementContext;
4509 }
void ThrowTagMismatch(NodeData startTag)
void ThrowUnexpectedToken(int pos, string expectedToken)

References System.Xml.XmlTextReaderImpl._curNode, System.Xml.XmlTextReaderImpl._index, System.Xml.XmlTextReaderImpl._nextParsingFunction, System.Xml.XmlTextReaderImpl._nodes, System.Xml.XmlTextReaderImpl._parsingFunction, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl.ParsingState.charPos, System.chars, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Xml.XmlTextReaderImpl.ParsingState.charsUsed, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.ParsingState.isEof, System.Xml.XmlCharType.IsNCNameSingleChar(), System.Xml.XmlCharType.IsWhiteSpace(), System.length, System.length2, System.Xml.XmlTextReaderImpl.ParsingState.lineNo, System.Xml.XmlTextReaderImpl.ParsingState.LinePos, System.Xml.XmlTextReaderImpl.OnNewLine(), System.Xml.XmlTextReaderImpl.ReadData(), System.Xml.XmlConvert.StrEqual(), System.Xml.XmlTextReaderImpl.ThrowTagMismatch(), System.Xml.XmlTextReaderImpl.ThrowUnclosedElements(), and System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken().

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