Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using loop to fetch values

Status
Not open for further replies.

zhshqzyc

Programmer
Jan 21, 2006
13
US
Hello,I am going to get the values of REASON ID from the following codes.
Such as 6 in <REASON ID="6" Description="Cash Reason">
5 in <REASON ID="5" Description="Check Reason">

I hope using loop to get them. I am using vb.net.

Thanks.
Code:
<Pickup>
<Tender TenderID="1" TenderGroup="1" TenderDescription=" Cash" AmountEntered="1.11" Variance="-98.8900" ExpectedAmt="100.0000" VarianceAmt="98.8900" LineNumber="1">
<REASON_CODES>
 <REASON ID="6" Description="Cash Reason">
  <SubReason0202 Caption="Sub2">t1</SubReason0202> 
  <SubReason0201 Caption="Sub1">t1</SubReason0201> 
  </REASON>
  </REASON_CODES>
  </Tender>
 <Tender TenderID="10" TenderGroup="3" TenderDescription="Check" AmountEntered="1.11" Variance="1.1100" ExpectedAmt="0.0000" VarianceAmt="-1.1100" LineNumber="2">
 <REASON_CODES>
 <REASON ID="5" Description="Check Reason">
  <SubReason0102 Caption="Sub2">t2</SubReason0102> 
  <SubReason0101 Caption="Sub1">t2</SubReason0101> 
  </REASON>
  </REASON_CODES>
  </Tender>
 <Tender TenderID="11" TenderGroup="3" TenderDescription="Mail Check" AmountEntered="1.11" Variance="1.1100" ExpectedAmt="0.0000" VarianceAmt="-1.1100" LineNumber="3">
 <REASON_CODES>
 <REASON ID="5" Description="Cheque Reason">
  <SubReason0102 Caption="Sub2">t3</SubReason0102> 
  <SubReason0101 Caption="Sub1">t3</SubReason0101> 
  </REASON>
  </REASON_CODES>
  </Tender>
 <Tender TenderID="22" TenderGroup="11" TenderDescription="Travelers Check" AmountEntered="1.11" Variance="1.1100" ExpectedAmt="0.0000" VarianceAmt="-1.1100" LineNumber="4">
 <REASON_CODES>
 <REASON ID="4" Description="Travelers Cheque Reason">
  <SubReason0202 Caption="Sub2">t4</SubReason0202> 
  <SubReason0201 Caption="Sub1">t4</SubReason0201> 
  </REASON>
  </REASON_CODES>
  </Tender>
 <Tender TenderID="27" TenderGroup="1" TenderDescription="Cash Back" AmountEntered=".11" Variance="0.1100" ExpectedAmt="0.0000" VarianceAmt="-0.1100" LineNumber="5">
 <REASON_CODES>
 <REASON ID="3" Description="Cash Back Reason">
  <SubReason0102 Caption="Sub2">t5</SubReason0102> 
  <SubReason0101 Caption="Sub1">t5</SubReason0101> 
  </REASON>
  </REASON_CODES>
  </Tender>
  <Tender TenderID="35" TenderGroup="1" TenderDescription="US Dollar" AmountEntered=".00" Variance="0.0000" ExpectedAmt="0.0000" VarianceAmt="0.0000" LineNumber="6" /> 
  <Tender TenderID="36" TenderGroup="11" TenderDescription="US Trav Cheque" AmountEntered=".00" Variance="0.0000" ExpectedAmt="0.0000" VarianceAmt="0.0000" LineNumber="7" /> 
  <Tender TenderID="200" TenderGroup="2" TenderDescription="FDC SVC" AmountEntered=".00" Variance="0.00" ExpectedAmt="0.00" VarianceAmt="0.00" LineNumber="8" /> 
  </Pickup>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top