EDN Admin
Well-known member
Hi, Im trying to group all the records based upon SSN and remove empty nodes. Here is my Input instace
<ns0:Record xmlns:ns0="http://test
<Root>
<Name>Name</Name>
<Location>Location</Location>
<State>State</State>
</Root>
<Records>
<Name>R1</Name>
<SSN>12345678</SSN>
<ID>
<Ohio>Y</Ohio>
<Location>cin</Location>
</ID>
<ID>
<Illinois>Y</Illinois>
<Location>Chic</Location>
</ID>
</Records>
<Records>
<Name>R2</Name>
<SSN>12345679</SSN>
<ID>
<Texas>Y</Texas>
<Location>Austin</Location>
</ID>
</Records>
<Records/>
</ns0:Record>
Output Instance:
<ns0:Record xmlns:ns0="http://test
<Root>
<Name>Name</Name>
<Location>Location</Location>
<State>State</State>
</Root>
<Records>
<Name>R1</Name>
<SSN>12345678</SSN>
<ID>
<Ohio>Y</Ohio>
<Location>cin</Location>
<Illinois>Y</Illinois>
<Location>Chic</Location>
</ID>
</Records>
<Records>
<Name>R2</Name>
<SSN>12345679</SSN>
<ID>
<Texas>Y</Texas>
<Location>Austin</Location>
</ID>
</Records>
</ns0:Record>
View the full article
<ns0:Record xmlns:ns0="http://test
<Root>
<Name>Name</Name>
<Location>Location</Location>
<State>State</State>
</Root>
<Records>
<Name>R1</Name>
<SSN>12345678</SSN>
<ID>
<Ohio>Y</Ohio>
<Location>cin</Location>
</ID>
<ID>
<Illinois>Y</Illinois>
<Location>Chic</Location>
</ID>
</Records>
<Records>
<Name>R2</Name>
<SSN>12345679</SSN>
<ID>
<Texas>Y</Texas>
<Location>Austin</Location>
</ID>
</Records>
<Records/>
</ns0:Record>
Output Instance:
<ns0:Record xmlns:ns0="http://test
<Root>
<Name>Name</Name>
<Location>Location</Location>
<State>State</State>
</Root>
<Records>
<Name>R1</Name>
<SSN>12345678</SSN>
<ID>
<Ohio>Y</Ohio>
<Location>cin</Location>
<Illinois>Y</Illinois>
<Location>Chic</Location>
</ID>
</Records>
<Records>
<Name>R2</Name>
<SSN>12345679</SSN>
<ID>
<Texas>Y</Texas>
<Location>Austin</Location>
</ID>
</Records>
</ns0:Record>
View the full article