Hey all,
I have requirement, on the basis of indicator = 'TL' I have to pick CoverageName and Limit and add the amounts of similiar coverages. Is there any way I could do that.
Here's xml:
<Policy>
<Vehicle id="v1">
<Coverage>
<CoverageName>ABC</CoverageName>
<CoverageLimit>Upto 50,000</CoverageLimit>
<CoverageAmount>100</CoverageAmount>
<Indicator>TL</Indicator>
</Coverage>
<Coverage>
<CoverageName>EFG</CoverageName>
<CoverageLimit>Upto 50,000</CoverageLimit>
<CoverageAmount>50</CoverageAmount>
<Indicator></Indicator>
</Coverage>
<Coverage>
<CoverageName>HIJ</CoverageName>
<CoverageLimit>Upto 10,000</CoverageLimit>
<CoverageAmount>20</CoverageAmount>
<Indicator></Indicator>
</Coverage>
<Coverage>
<CoverageName>KLM</CoverageName>
<CoverageLimit>Upto 100,000</CoverageLimit>
<CoverageAmount>10</CoverageAmount>
<Indicator>TL</Indicator>
</Coverage>
</Vehicle>
<Vehicle id="v2">
<Coverage>
<CoverageName>ABC</CoverageName>
<CoverageLimit>Upto 50,000</CoverageLimit>
<CoverageAmount>100</CoverageAmount>
<Indicator>TL</Indicator>
</Coverage>
<Coverage>
<CoverageName>EFG</CoverageName>
<CoverageLimit>Upto 50,000</CoverageLimit>
<CoverageAmount>50</CoverageAmount>
<Indicator></Indicator>
</Coverage>
<Coverage>
<CoverageName>HIJ</CoverageName>
<CoverageLimit>Upto 10,000</CoverageLimit>
<CoverageAmount>20</CoverageAmount>
<Indicator></Indicator>
</Coverage>
<Coverage>
<CoverageName>KLM</CoverageName>
<CoverageLimit>Upto 100,000</CoverageLimit>
<CoverageAmount>10</CoverageAmount>
<Indicator>TL</Indicator>
</Coverage></Vehicle>
<Vehicle id="v3">
<Coverage>
<CoverageName>ABC</CoverageName>
<CoverageLimit>Upto 50,000</CoverageLimit>
<CoverageAmount>100</CoverageAmount>
<Indicator>TL</Indicator>
</Coverage>
<Coverage>
<CoverageName>EFG</CoverageName>
<CoverageLimit>Upto 50,000</CoverageLimit>
<CoverageAmount>50</CoverageAmount>
<Indicator></Indicator>
</Coverage>
<Coverage>
<CoverageName>HIJ</CoverageName>
<CoverageLimit>Upto 10,000</CoverageLimit>
<CoverageAmount>20</CoverageAmount>
<Indicator></Indicator>
</Coverage>
<Coverage>
<CoverageName>KLM</CoverageName>
<CoverageLimit>Upto 100,000</CoverageLimit>
<CoverageAmount>10</CoverageAmount>
<Indicator>TL</Indicator>
</Coverage>
</Vehicle>
</Policy>
The output I want is in three columns
ABC Upto 50,000 300
KLM Upto 100,000 30
Thankx in advance