To remove record using xslt

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, I do have the below input instance, If there is empty </name> tag or empty request tag, want to remove those records in outbound.


<ns0:Record xmlns:ns0="http://test
<Request>
<Name>gsg</Name>
<Location>
<State>IL</State>
<Country>US</Country>
</Location>
</Request>
<Request>
<Name/>
<Location>
<State>NY</State>
<Country>US</Country>
</Location>
</Request>
<Request>
<Name>sample</Name>
<Location>
<State>FL</State>
<Country>US</Country>
</Location>
</Request>
</ns0:Record>


Output instance:

<ns0:Record xmlns:ns0="http://test
<Request>
<Name>gsg</Name>
<Location>
<State>IL</State>
<Country>US</Country>
</Location>
</Request>
<Request>
<Name>sample</Name>
<Location>
<State>FL</State>
<Country>US</Country>
</Location>
</Request>
</ns0:Record>



View the full article
 
Back
Top