Can you please let me know how to group below input file:
<root>
<group>
<fInfo>21-21-02.xml</fInfo>
<bInfo>21-21-02-01</bInfo>
</group>
<group>
<fInfo>21-21-02-01.xml</fInfo>
<bInfo>21-21-02-01-01</bInfo>
<bInfo>21-21-02-01-02</bInfo>
<bInfo>21-21-02-01-03</bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml</fInfo>
<bInfo>21-21-02-01-03A</bInfo>
<bInfo>21-21-02-01-03B</bInfo>
</group>
<group>
<fInfo>21-21-02-01-04.xml</fInfo>
<bInfo>21-21-02-01-04</bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml</fInfo>
<bInfo>21-21-02-01-03C</bInfo>
<bInfo>21-21-02-01-04A</bInfo>
</group>
</root>
to as below:
<?xml version="1.0" encoding="utf-8"?>
<root>
<group>
<fInfo>21-21-02.xml</fInfo>
<bInfo>21-21-02-01</bInfo>
</group>
<group>
<fInfo>21-21-02-01.xml</fInfo>
<bInfo>21-21-02-01-01</bInfo>
<bInfo>21-21-02-01-02</bInfo>
<bInfo>21-21-02-01-03</bInfo>
<bInfo>21-21-02-01-04 <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml</fInfo>
<bInfo>21-21-02-01-03A</bInfo>
<bInfo>21-21-02-01-03B</bInfo>
<bInfo>21-21-02-01-03C <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-04.xml</fInfo>
<bInfo>21-21-02-01-04A <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml</fInfo>
</group>
</root>
Thanks
http://www.stylusstudio.com/xsllist/200607/post90410.html
http://www.codeproject.com/KB/XML/groupxml.aspx