Rajkumar R

Rajkumar R

  • NA
  • 183
  • 219.7k

If tag value equal to null then How to get tag value in XML to VB.NET

Dec 31 2011 1:15 AM
<ENVELOPE>
- <SHGREPAYMENT>
  <CLUSTERID>SLMCLT0002</CLUSTERID> 
  <UNITTYPE>VIL</UNITTYPE> 
  <VPRCID>SLMVIL0019</VPRCID> 
  <YYYYMM>201106</YYYYMM> 
  <PIPNO>67890b</PIPNO> 
  <NAMEOFTHEMEMBER>Parvati-67890b</NAMEOFTHEMEMBER> 
  <SHGID>S1</SHGID> 
  <SHGNAME>Omshakthi</SHGNAME> 
  <TYPEOFLOAN>DL</TYPEOFLOAN> 
  <PRINCIPAL>1000.00</PRINCIPAL> 
  <INTEREST> </INTEREST>
  </SHGREPAYMENT>
- <SHGREPAYMENT>
  <CLUSTERID>SLMCLT0002</CLUSTERID> 
  <UNITTYPE>VIL</UNITTYPE> 
  <VPRCID>SLMVIL0019</VPRCID> 
  <YYYYMM>201106</YYYYMM> 
  <PIPNO>67891a</PIPNO> 
  <NAMEOFTHEMEMBER>Valli-67891a</NAMEOFTHEMEMBER> 
  <SHGID>S1</SHGID> 
  <SHGNAME>Omshakthi</SHGNAME> 
  <TYPEOFLOAN>DL</TYPEOFLOAN> 
  <PRINCIPAL>1000.00</PRINCIPAL> 
  <INTEREST></INTEREST>
  </SHGREPAYMENT>
</ENVELOPE>
THE ABOVE IS THE XML DATA. Here i got all the tag value, but interest tag value i m not able to get that, because if this tag contain null value means how to get that and store in the database. The interest field defined as numeric in the database(sql server) so it does not accept null we want to save it as 0.
i tried the following method also
Convert.Toint32datareader("INTEREST") but i could not solve the problem
post solution for this post
WISH U HAPPY NEW YEAR  
Thanks in Advance



Answers (1)