var doc = XDocument.Parse(inputXML);
this bombs out when "amount" node is not present. How can I check for existence prior to evaluating?
decimal amt;
var amount = doc.Descendants("amount").SingleOrDefault().Value;
bool amountValid = decimal.TryParse(amount, out amt);
I need to make sure "amount" is available prior to evaluating.
Can anyone help?
Thanks All, ~ck in San Diego