Objective is to generate hierarchial xml



Input data is in the form of spreadsheet.


Which has colums H1, H2, H3 H4, H5, startdate,  enddate, height, width, phases and rating


I want to generate hirerichial xml

H1
H2
  H3
   H4
     H5

That means H4 is parent of H5, H3 is parent of H4 and so on......


A format of an xml will be

   type='H1'>
 
  width =  />

  type ='H2'>
    type='H1'>
       End= />
   
    
width= />



  type ='H2'>
    type='H2'>
       End= />
       



  type ='H4'>
    type='H3'>
       End= />
   
    />    



  type ='H5'>
    type='H4'>
       End= />
   
    />   



In Visual studio 2012
I am planning to get a data from spreadsheet into a dataset

Create the following classes
SetEquipment
SetParentEquipment
Address
TransformerAttributes
SPAttributes

using the namespace system.linq to generate xml

Question:

If anyone has any suggestion for better design this can be done I am very much interested

Thanks