Click here to Skip to main content
15,614,421 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have one xml file where the code looks as below:

XML
<tollfree>
  <holidays><![CDATA[1/1/2009,1/15/2009,2/19/2009,5/28/2009,7/4/2009,05/31/2010]]></holidays>
  <weekdays>
    <monday>
      <starttime><![CDATA[09:30]]></starttime>
      <endtime><![CDATA[18:30]]></endtime>
    </monday>
    <tuesday>
      <starttime><![CDATA[06:30]]></starttime>
      <endtime><![CDATA[22:30]]></endtime>
    </tuesday>    
  </weekdays>
  <partner><![CDATA[040-170-72666]]></partner7>
</tollfree>

<tollfree>

I am retrieving that xml file into a dataset. But Im getting the 3 nodes holidays,weekdays and partner as columns. Ex:
ds.Tables[0].Rows[0]["holidays"].ToString()
ds.Tables[0].Rows[0]["weekdays"].ToString()
ds.Tables[0].Rows[0]["partner"].ToString()

But i want the inner nodes also i.e., monday,tuesday and starttime and endtime inside them. Im not able to get how to access them through the dataset. Can anybody please help? I need it only by using dataset. Waiting for response.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900