I need to remove namespace aliases from an xml. This xml is being received from a backend service (different responses can have different structures) and needs to be converted to Json format finally. Hence i'm looking for a generic XSLT to remove namespace aliases from xml before i convert it to Jsonx and then Json.
XML i currently have:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns4:policySnapshotResponse xmlns="http://www.aig.com/ACORD1/xml/" xmlns:ns4="http://www.aig.com/gct/services/PolicyInquiryServiceV1.0" xmlns:ns2="http://www.ACORD.org/standards/PC_Surety/ACORD1/xml/" xmlns:ns3="http://www.aig.com/gct/services/commonHeaderV1.0">
<ns4:requestHeader>
<ns3:id>Spoofy</ns3:id>
<ns3:requestApplicationID/>
<ns3:requestMessageID/>
<ns3:echoBack>false</ns3:echoBack>
</ns4:requestHeader>
<ns4:applicationContext>
<ns3:businessSegment>CL</ns3:businessSegment>
<ns3:region>ALL</ns3:region>
<ns3:knowledgeDate>2015-05-24</ns3:knowledgeDate>
<ns3:country>IE</ns3:country>
<ns3:language>en</ns3:language>
<ns3:lineOfBusiness>aig:CAUSC</ns3:lineOfBusiness>
<ns3:subLineOfBusiness>AUTOP</ns3:subLineOfBusiness>
<ns3:systemDate>2015-06-03</ns3:systemDate>
<ns3:targetSystemName>GOALD</ns3:targetSystemName>
</ns4:applicationContext>
<ns4:PolicyInqRs>
<ns2:PolInfo>
<ns2:CommlPropertyPolicy>
<ns2:CommlPolicy/>
</ns2:CommlPropertyPolicy>
</ns2:PolInfo>
</ns4:PolicyInqRs>
</ns4:policySnapshotResponse>
</soapenv:Body>
</soapenv:Envelope>
Xml i need without namespacesand soap envelope:
<policySnapshotResponse>
<requestHeader>
<id>Spoofy</id>
<requestApplicationID/>
<requestMessageID/>
<echoBack>false</echoBack>
</requestHeader>
<applicationContext>
<businessSegment>CL</businessSegment>
<region>ALL</region>
<knowledgeDate>2015-05-24</knowledgeDate>
<country>IE</country>
<language>en</language>
<lineOfBusiness>aig:CAUSC</lineOfBusiness>
<subLineOfBusiness>AUTOP</subLineOfBusiness>
<systemDate>2015-06-03</systemDate>
<targetSystemName>GOALD</targetSystemName>
</applicationContext>
<PolicyInqRs>
<PolInfo>
<CommlPropertyPolicy>
<CommlPolicy/>
</CommlPropertyPolicy>
</PolInfo>
</PolicyInqRs>
</policySnapshotResponse>
I am converting ths xml further to jsonx and then to json.