Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to convert from XML to tdataset

$
0
0

Hi Experts,

I am struggling to get from xml to dataset. 

 XML Like: 

<BudgetGroups>

<BudgetGroup GroupID="001" Description="Soft costs">

<LineItems>

  <LineItem LineItemID="01" PercentComplete="100" Drawn="200000"  />

  <LineItem LineItemID="02" PercentComplete="200" Drawn="300000" />

  <LineItem LineItemID="03" PercentComplete="300" Drawn="400000"  />

  </LineItems>

  </BudgetGroup>

  <BudgetGroup GroupID="02" Description="Hard Costs">

  <LineItems>

  <LineItem LineItemID="01" PercentComplete="20" Drawn="40000" />

  <LineItem LineItemID="02" PercentComplete="20" Drawn="40000" />

  <LineItem LineItemID="03" PercentComplete="20" Drawn="40000" />

  <LineItem LineItemID="04" PercentComplete="40" Drawn="80000" />

  </LineItems>

  </BudgetGroup>

  </BudgetGroups>

Output should be like :

GroupID LineItemID PercentComplete  Drawn 
001	      01	     100		         2000
001	      02	     200		         3000
001	      03	     300		         4000 
02	      01	     20		                 4000
02	      02	     20		                 4000 
02	      03	     20		                 4000
02	      04	     40		                 8000


Waiting for valuable response.

Regards,

RAMBHARATH


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>