Hi,
I want to implemenet a many to many maping which should follow the following ogic:
My Input XML file is:
<INROOT>
<Ins>
<Start>2004-12-10</Start>
<End>2006-12-31</End>
<GroupName>XYZ</GroupName>
</Ins>
<Ins>
<Start>2005-10-05</Start>
<End>2006-11-12</End>
<GroupName>ABC</GroupName>
</Ins>
<Ins>
<Start>2005-03-13</Start>
<End>2006-12-31</End>
<GroupName>DEF</GroupName>
</Ins>
</INROOT>
And I want the following output:
<OUTROORT>
<Matrix Start="2004-12-10" End="2005-03-12">
<GroupName> XYZ </GroupName>
</Matrix>
<Matrix Start="2005-03-13" End="2005-10-04">
<GroupName> XYZ </GroupName>
<GroupName> DEF </GroupName>
</Matrix>
<Matrix Start="2005-10-05" End="2006-11-12">
<GroupName> XYZ </GroupName>
<GroupName> ABC </GroupName>
<GroupName> DEF </GroupName>
</Matrix>
<Matrix Start="2005-11-13" End="2006-12-31">
<GroupName> XYZ </GroupName>
<GroupName> DEF </GroupName>
</Matrix>
</OUTROORT>
The mapping logic would be:
Divide all the date using start and end date (sorting based on start and date might be useful) and include all the Group name which resides in that range..
Any help would be highly appreciable..
Akash