CSharp examples for System.Xml:XML Node
Get Value Or Inner Text from XmlNode
using System.Xml; using System;//from w ww . j a v a 2s .co m public class Main{ public static string GetValueOrInnerText(XmlNode node) { XmlAttribute attr = node.Attributes["value"]; if (attr!=null) return attr.InnerText; return node.InnerText; } }