I'm trying to get the sum of the @valueOf attribute from a node list. There can be x number of records
if for instance there are three records , my code below only gets the first record 3 times
Dim _values As XmlNodeList = _temp_xml_Doc.SelectNodes("/BACSDocument/Data/ARUDD/Advice/OriginatingAccountRecords/OriginatingAccountRecord/ReturnedDebitItem") Dim Counter As Integer = 0 For Counter = 1 To _values.Count Dim x As XmlAttribute = _temp_xml_Doc.SelectSingleNode("/BACSDocument/Data/ARUDD/Advice/OriginatingAccountRecords/OriginatingAccountRecord/ReturnedDebitItem/@valueOf") _totalvalue = _totalvalue + CDec(x.Value) Next
*This post is locked for comments