public static string GetText(this XmlReader xmlReader) { string text = string.Empty; if (xmlReader.NodeType == XmlNodeType.Element) { text = xmlReader.ReadElementContentAs(typeof(string), null) as string; } return text; } }