CSharp examples for System.Xml:XPath
Select Single XML Text Decimal
using System.Xml; using System;//from w w w .j a v a 2 s . co m public class Main{ public static decimal? SelectSingleTextDecimal(XmlNode node, string selector, decimal? defaultValue = null) { workNode = node.SelectSingleNode(selector, Manager); if (workNode != null && decimal.TryParse(workNode.InnerText, out dTryParse)) { return dTryParse; } return defaultValue; } }