XML : how to get the inner node and its children value of xml document in c#

i have an xml document like the below

   <?xml version='1.0'?>  <ENVELOPE>  <HEADER>      <TALLYREQUEST>Import Data</TALLYREQUEST>  </HEADER>  <BODY>      <IMPORTDATA>          <REQUESTDESC><REPORTNAME>All Masters</REPORTNAME><STATICVARIABLES><SVCURRENTCOMPANY>MSIT</SVCURRENTCOMPANY></STATICVARIABLES></REQUESTDESC>          <REQUESTDATA>              <TALLYMESSAGE>  <Entry_x0020_NO.>125</Entry_x0020_NO.>  <DATE>12</DATE>  <GUID>1258</GUID>  <NARRATION>1542</NARRATION>  <VOTURETYPENAME>456</VOTURETYPENAME>  <NAME>achuth</NAME>  <AMOUNT>250</AMOUNT>    </TALLYMESSAGE>          </REQUESTDATA>      </IMPORTDATA>  </BODY>  </ENVELOPE>    

in which i need to get the inner node tally Message and its children inner text values using c# code in a loop and make each node as excel sheet column name and the values as row values in excel.

No comments:

Post a Comment