Hi, I have below xml and I want to have two tables with sorted data like first tabel should be sorted with term years and second table should be sorted with term years and claim type. please help me first table
Second table
XML
<Data> <StateDetails> <ClaimDetails> <State>UP</State> <EffectiveDate>2020-09-20</EffectiveDate> <ExpirationDate>2021-09-20</ExpirationDate> <Claims id="c7059429FF5044F5F9E72F0D366693D24"> <Type>LOSS</Type> <ClaimsPersonal>2</ClaimsPersonal> <ClaimsBusiness>1</ClaimsBusiness> <TotalClaims>3</TotalClaims> <ClaimsPersonalAmount>10000</ClaimsPersonalAmount> <ClaimsBusinessAmount>20000</ClaimsBusinessAmount> <ClaimsAmount>30000</ClaimsAmount> </Claims> <Claims id="xyz59429FF5677F5F9E72F0D366693C00"> <Type>FIRE</Type> <ClaimsPersonal>5</ClaimsPersonal> <ClaimsBusiness>5</ClaimsBusiness> <TotalClaims>10</TotalClaims> <ClaimsPersonalAmount>50000</ClaimsPersonalAmount> <ClaimsBusinessAmount>30000</ClaimsBusinessAmount> <ClaimsAmount>80000</ClaimsAmount> </Claims> <Claims id="xyz77629FF5677F5F9E72F0D366693E12"> <Type>THEFT</Type> <ClaimsPersonal>1</ClaimsPersonal> <ClaimsBusiness>1</ClaimsBusiness> <TotalClaims>2</TotalClaims> <ClaimsPersonalAmount>150000</ClaimsPersonalAmount> <ClaimsBusinessAmount>50000</ClaimsBusinessAmount> <ClaimsAmount>200000</ClaimsAmount> </Claims> </ClaimDetails> <ClaimDetails> <State>MP</State> <EffectiveDate>2020-09-20</EffectiveDate> <ExpirationDate>2021-09-20</ExpirationDate> <Claims id="c7059429FF5044F5F9E72F0D366693D24"> <Type>LOSS</Type> <ClaimsPersonal>2</ClaimsPersonal> <ClaimsBusiness>2</ClaimsBusiness> <TotalClaims>4</TotalClaims> <ClaimsPersonalAmount>20000</ClaimsPersonalAmount> <ClaimsBusinessAmount>20000</ClaimsBusinessAmount> <ClaimsAmount>40000</ClaimsAmount> </Claims> <Claims id="xyz59429FF5677F5F9E72F0D366693C00"> <Type>FIRE</Type> <ClaimsPersonal>1</ClaimsPersonal> <ClaimsBusiness>1</ClaimsBusiness> <TotalClaims>2</TotalClaims> <ClaimsPersonalAmount>50000</ClaimsPersonalAmount> <ClaimsBusinessAmount>50000</ClaimsBusinessAmount> <ClaimsAmount>100000</ClaimsAmount> </Claims> </ClaimDetails> <ClaimDetails> <State>MP</State> <EffectiveDate>2019-09-20</EffectiveDate> <ExpirationDate>2020-09-20</ExpirationDate> <Claims id="c7059429FF5044F5F9E72F0D3644493324"> <Type>LOSS</Type> <ClaimsPersonal>2</ClaimsPersonal> <ClaimsBusiness>2</ClaimsBusiness> <TotalClaims>4</TotalClaims> <ClaimsPersonalAmount>20000</ClaimsPersonalAmount> <ClaimsBusinessAmount>20000</ClaimsBusinessAmount> <ClaimsAmount>40000</ClaimsAmount> </Claims> <Claims id="xyz59429FF5677F5F9E72F0D366693X11"> <Type>FIRE</Type> <ClaimsPersonal>1</ClaimsPersonal> <ClaimsBusiness>1</ClaimsBusiness> <TotalClaims>2</TotalClaims> <ClaimsPersonalAmount>50000</ClaimsPersonalAmount> <ClaimsBusinessAmount>50000</ClaimsBusinessAmount> <ClaimsAmount>100000</ClaimsAmount> </Claims> <Claims id="xyz77629FF5677F5F9E72F0D36669SD12"> <Type>THEFT</Type> <ClaimsPersonal>1</ClaimsPersonal> <ClaimsBusiness>1</ClaimsBusiness> <TotalClaims>2</TotalClaims> <ClaimsPersonalAmount>150000</ClaimsPersonalAmount> <ClaimsBusinessAmount>50000</ClaimsBusinessAmount> <ClaimsAmount>200000</ClaimsAmount> </Claims> </ClaimDetails> </StateDetails> </Data>