public virtual string ReadElementString()
{
string result = string.Empty;
if (MoveToContent() != XmlNodeType.Element)
{
throw new XmlException(SR.Xml_InvalidNodeType, this.NodeType.ToString(), this as IXmlLineInfo);
}
if (!this.IsEmptyElement)
{
Read();
result = ReadString();
if (this.NodeType != XmlNodeType.EndElement)
{
throw new XmlException(SR.Xml_UnexpectedNodeInSimpleContent, new string[] { this.NodeType.ToString(), "ReadElementString" }, this as IXmlLineInfo);
}
Read();
}
else
{
Read();
}
return result;
}