R
Raul
Hi,
I have the following code, which picks up 43 different nodes from my
XML document
XmlNodeList amortNodes = amortDoc.SelectNodes("//
TValueAmortizationSchedule/AmortizationLine");
each node looks like this:
<AmortizationLineType>8</AmortizationLineType>
<Date>09/01/2006</Date>
<Loan1Amount>100000000</Loan1Amount>
<Loan2Amount></Loan2Amount>
<Loan3Amount></Loan3Amount>
<Payment1Amount></Payment1Amount>
<Payment2Amount></Payment2Amount>
<Payment3Amount></Payment3Amount>
<InterestAccrued>0</InterestAccrued>
<InterestPaid>0</InterestPaid>
<PrincipalPaid>0</PrincipalPaid>
<UnpaidInterestBalance>0</UnpaidInterestBalance>
<PrincipalBalance>100000000</PrincipalBalance>
<TotalBalance>100000000</TotalBalance>
<RateChangeRate></RateChangeRate>
<RateChangeCompounding>13</RateChangeCompounding>
Now I am trying to loop through the node list to get get the nodes
with AmortizationLineType = 8
foreach (XmlNode amortNode in amortNodes)
{
amortType = amortNode.SelectSingleNode("//AmortizationLine/
AmortizationLineType").InnerText;
if (amortType.Equals("8"))
{
count++;
...........
}
}
Now I know from my debugging, that not all 43 nodes fulfil this
criteria (ie amortType=8). However, when I run this application, the
amortType always comes back as 8, which seems to tell me it is not
picking up the value? Any ideas?
Thanks for your help.
I have the following code, which picks up 43 different nodes from my
XML document
XmlNodeList amortNodes = amortDoc.SelectNodes("//
TValueAmortizationSchedule/AmortizationLine");
each node looks like this:
<AmortizationLineType>8</AmortizationLineType>
<Date>09/01/2006</Date>
<Loan1Amount>100000000</Loan1Amount>
<Loan2Amount></Loan2Amount>
<Loan3Amount></Loan3Amount>
<Payment1Amount></Payment1Amount>
<Payment2Amount></Payment2Amount>
<Payment3Amount></Payment3Amount>
<InterestAccrued>0</InterestAccrued>
<InterestPaid>0</InterestPaid>
<PrincipalPaid>0</PrincipalPaid>
<UnpaidInterestBalance>0</UnpaidInterestBalance>
<PrincipalBalance>100000000</PrincipalBalance>
<TotalBalance>100000000</TotalBalance>
<RateChangeRate></RateChangeRate>
<RateChangeCompounding>13</RateChangeCompounding>
Now I am trying to loop through the node list to get get the nodes
with AmortizationLineType = 8
foreach (XmlNode amortNode in amortNodes)
{
amortType = amortNode.SelectSingleNode("//AmortizationLine/
AmortizationLineType").InnerText;
if (amortType.Equals("8"))
{
count++;
...........
}
}
Now I know from my debugging, that not all 43 nodes fulfil this
criteria (ie amortType=8). However, when I run this application, the
amortType always comes back as 8, which seems to tell me it is not
picking up the value? Any ideas?
Thanks for your help.