public static String GetElementValue(XmlElement e) { for (XmlNode child = e.FirstChild; child != null; child = child.NextSibling) { if (!(child is XmlText)) { continue; } return child.Value; } return null; }