Parent-Child Record mapping using (inline XSLT) scripting functoid
My Sample Input file is- <ns0:Root xmlns:ns0="http://parent.Sch_Input">
- <ParentChildDetails>
<ID>1</ID>
<Records Type="Parent" Id="P001" Name="swetha" POB="1984-01-09" Gender="F" />
</ParentChildDetails>
- <ParentChildDetails>
<ID>2</ID>
<Records Type="Child" Id="3" Name="Shruthi" POB="2007-12-06" Gender="F" />
</ParentChildDetails>
- <ParentChildDetails>
<ID>3</ID>
<Records Type="Parent" Id="P002" Name="suma" POB="1981-12-31" Gender="F" />
</ParentChildDetails>
- <ParentChildDetails>
<ID>4</ID>
<Records Type="Child" Id="1" Name="Prem" POB="2009-02-14" Gender="M" />
</ParentChildDetails>
</ns0:Root>
and i want my output files to be arranged in parent-child combination according to this
- <ns0:Root xmlns:ns0="http://parent.Sch_Output">
- <ParentRecord ParentId="1">
- <ChildRecord>
<Name>Prem</Name>
<DOB>2009-02-14</DOB>
<Gender>M</Gender>
</ChildRecord>
</ParentRecord>
- <ParentRecord ParentId="3">
- <ChildRecord>
<Name>Shruthi</Name>
<DOB>2007-12-06</DOB>
<Gender>F</Gender>
</ChildRecord>
</ParentRecord>
</ns0:Root>