I am trying to remove namespace prefixes. I have tried a couple XSLTs but they do not seem to work (will show why after the example).
Example current xml output:
<s:Body xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<ns:GetPriceSet xmlns:ns="http://abc.org/01/02">
<ns:og>
<TestElement1 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<TestElement2 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ns:og>
</ns:GetPriceSet>
</s:Body>
What I want:
<s:Body xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<GetPriceSet xmlns="http://abc.org/01/02">
<og>
<TestElement1 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<TestElement2 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</og>
</GetPriceSet>
</s:Body>
I tried using both XSLTs from here: How to remove namespace prefix leaving namespace value (XSLT)?
The problem is that the ns: is instead replaced by ns0 and ns1 instead of being removed completely by the XSLTs. So I assume the XSLT needs to be further modified.