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