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

◆ ScanQName() [2/2]

void System.Xml.DtdParser.ScanQName ( bool isQName)
inlineprivate

Definition at line 2662 of file DtdParser.cs.

2663 {
2665 int num = -1;
2666 while (true)
2667 {
2668 if (XmlCharType.IsStartNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':')
2669 {
2670 _curPos++;
2671 }
2672 else if (_curPos + 1 >= _charsUsed)
2673 {
2674 if (ReadDataInName())
2675 {
2676 continue;
2677 }
2679 }
2680 else
2681 {
2683 }
2684 while (true)
2685 {
2686 if (XmlCharType.IsNCNameSingleChar(_chars[_curPos]))
2687 {
2688 _curPos++;
2689 continue;
2690 }
2691 if (_chars[_curPos] == ':')
2692 {
2693 if (isQName)
2694 {
2695 break;
2696 }
2697 _curPos++;
2698 continue;
2699 }
2700 if (_curPos == _charsUsed)
2701 {
2702 if (ReadDataInName())
2703 {
2704 continue;
2705 }
2706 if (_tokenStartPos == _curPos)
2707 {
2709 }
2710 }
2711 _colonPos = ((num == -1) ? (-1) : (_tokenStartPos + num));
2712 return;
2713 }
2714 if (num != -1)
2715 {
2716 Throw(_curPos, System.SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0'));
2717 }
2718 num = _curPos - _tokenStartPos;
2719 _curPos++;
2720 }
2721 }
static string Xml_BadStartNameChar
Definition SR.cs:42
static string Xml_BadNameChar
Definition SR.cs:44
static string Xml_UnexpectedEOF
Definition SR.cs:36
Definition SR.cs:7
void Throw(int curPos, string res)

References System.Xml.DtdParser._chars, System.Xml.DtdParser._charsUsed, System.Xml.DtdParser._colonPos, System.Xml.DtdParser._curPos, System.Xml.DtdParser._tokenStartPos, System.Xml.XmlException.BuildCharExceptionArgs(), System.Xml.XmlCharType.IsNCNameSingleChar(), System.Xml.XmlCharType.IsStartNCNameSingleChar(), System.Xml.DtdParser.ReadDataInName(), System.Xml.DtdParser.Throw(), System.SR.Xml_BadNameChar, System.SR.Xml_BadStartNameChar, and System.SR.Xml_UnexpectedEOF.