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

◆ ReadElementString() [3/3]

virtual string System.Xml.XmlReader.ReadElementString ( string name)
inlinevirtualinherited

Reimplemented in System.Xml.XmlAsyncCheckReader.

Definition at line 696 of file XmlReader.cs.

697 {
698 string result = string.Empty;
699 if (MoveToContent() != XmlNodeType.Element)
700 {
701 throw new XmlException(System.SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
702 }
703 if (Name != name)
704 {
705 throw new XmlException(System.SR.Xml_ElementNotFound, name, this as IXmlLineInfo);
706 }
707 if (!IsEmptyElement)
708 {
709 result = ReadString();
710 if (NodeType != XmlNodeType.EndElement)
711 {
712 throw new XmlException(System.SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
713 }
714 Read();
715 }
716 else
717 {
718 Read();
719 }
720 return result;
721 }
static string Xml_InvalidNodeType
Definition SR.cs:88
static string Xml_ElementNotFound
Definition SR.cs:100
Definition SR.cs:7
virtual XmlNodeType MoveToContent()
Definition XmlReader.cs:604
XmlNodeType NodeType
Definition XmlReader.cs:62
virtual string ReadString()
Definition XmlReader.cs:570
virtual string Name
Definition XmlReader.cs:65

References System.Xml.Dictionary, System.Xml.XmlReader.IsEmptyElement, System.Xml.XmlReader.MoveToContent(), System.Xml.XmlReader.Name, System.Xml.XmlReader.NodeType, System.Xml.XmlReader.Read(), System.Xml.XmlReader.ReadString(), System.SR.Xml_ElementNotFound, System.SR.Xml_InvalidNodeType, and System.Xml.XmlException.