method (XSLT) to group nodes per father element

Prawnz

New Member
I would like to group nodes per father elements.Here the father element is : FDDCell id="AAA" method="modify"
  • The father element is repeated two times.
  • I would like "FDDCell id" to appear only one time. and group all the nodes under "FDDCell id"
Here is the XML input file:\[code\]<?xml version="1.0" encoding="UTF-8"?><start><FDDCell id="AAA" method="modify"><UMTSFddNeighbouringCell id="FAR_AWAY" method="create"> <attributes> <mbmsNeighbouringWeight>0.0</mbmsNeighbouringWeight> </attributes></UMTSFddNeighbouringCell></FDDCell><FDDCell id="AAA" method="modify"><attributes> <cacConfId>RadioAccessService/0 DedicatedConf/0 CacConfClass/10</cacConfId> <layerPreferredForR99>true</layerPreferredForR99> <reserved0>1398341632</reserved0> <reserved1>1398352896</reserved1> <reserved2>1616994144</reserved2> <reserved3>1616994144</reserved3></attributes></FDDCell></start>\[/code\]Here is the output file desired:\[code\] <?xml version="1.0" encoding="UTF-8"?> <start> <FDDCell id="AAA" method="modify"> <UMTSFddNeighbouringCell id="FAR_AWAY" method="create"> <attributes> <mbmsNeighbouringWeight>0.0</mbmsNeighbouringWeight> </attributes> </UMTSFddNeighbouringCell><attributes> <cacConfId>RadioAccessService/0 DedicatedConf/0 CacConfClass/10</cacConfId> <layerPreferredForR99>true</layerPreferredForR99> <reserved0>1398341632</reserved0> <reserved1>1398352896</reserved1> <reserved2>1616994144</reserved2> <reserved3>1616994144</reserved3></attributes></FDDCell></start>\[/code\]thanks so much for your support
 
Back
Top