Data Table Relation in Dataset
-
I have a dataset with multiple tables in it. This dataset is created by reading an XML which has nested tables which is shown below. <allocate> <cabin cabintypeId="3" cabinType="deluxe" shareFlag="true" OccupancyType="TripleShare" sameGender="true" cabinId="001" Adult="2" Child="0" Infant="0" availablebeds="1"> <occupant firstname="Micheal" lastname="Lauzon" age="adult" gender="male" nationality="UnitedStates" usePackage="yes" roomrate="100" presold="true" /> <occupant firstname="John" lastname="Martin" age="adult" gender="male" nationality="Australia" usePackage="yes" roomrate="100" presold="false" /> </cabin> <cabin cabintypeId="1" cabinType="Standard" shareFlag="true" OccupancyType="single" sameGender="true" cabinId="005" Adult="1" Child="0" Infant="0" availablebeds="0"> <occupant firstname="Jacob" lastname="Dror" age="adult" gender="male" nationality="UnitedStates" usePackage="yes" roomrate="90" presold="false" /> </cabin> </allocate> once it is transferred to a dataset, it is divided into two independent tables "Cabin" and "occupant". With what reference can I read the data and identify it. What I mean is, in the above XML Set, how can I differentiate that for cabintypeId="3" there are two occupants named John and Michael. As well as for cabintypeId="1" occupant firstname="Jacob". As Cabin and Occupants are two different tables. I suppose I need to identify some Key value for the Relation defined internally for the datatables. How can I do this? Please help me out.. If I am not clear, I can Explain it more... Thanks... Rijz