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

◆ ReadElementString() [2/3]

virtual string System.Xml.XmlReader.ReadElementString ( string localname,
string ns )
inlinevirtualinherited

Reimplemented in System.Xml.XmlAsyncCheckReader.

Definition at line 724 of file XmlReader.cs.

725 {
726 string result = string.Empty;
727 if (MoveToContent() != XmlNodeType.Element)
728 {
729 throw new XmlException(System.SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
730 }
731 if (LocalName != localname || NamespaceURI != ns)
732 {
733 throw new XmlException(System.SR.Xml_ElementNotFoundNs, new string[2] { localname, ns }, this as IXmlLineInfo);
734 }
735 if (!IsEmptyElement)
736 {
737 result = ReadString();
738 if (NodeType != XmlNodeType.EndElement)
739 {
740 throw new XmlException(System.SR.Xml_InvalidNodeType, NodeType.ToString(), this as IXmlLineInfo);
741 }
742 Read();
743 }
744 else
745 {
746 Read();
747 }
748 return result;
749 }
static string Xml_ElementNotFoundNs
Definition SR.cs:102
static string Xml_InvalidNodeType
Definition SR.cs:88
Definition SR.cs:7
virtual XmlNodeType MoveToContent()
Definition XmlReader.cs:604
XmlNodeType NodeType
Definition XmlReader.cs:62
virtual string ReadString()
Definition XmlReader.cs:570

References System.Xml.Dictionary, System.Xml.XmlReader.IsEmptyElement, System.Xml.XmlReader.LocalName, System.Xml.XmlReader.MoveToContent(), System.Xml.XmlReader.NamespaceURI, System.Xml.XmlReader.NodeType, System.Xml.XmlReader.Read(), System.Xml.XmlReader.ReadString(), System.SR.Xml_ElementNotFoundNs, System.SR.Xml_InvalidNodeType, and System.Xml.XmlException.