Hi Friends ,
I need some help in XSLT programming.
My requirement is something like this:
<b>Input XML:</b>
<?xml version="1.0" encoding="UTF-8"?>
http://www.govtalk.gov.uk/CM/envelope">
<ns0:EnvelopeVersion>2.0</ns0:EnvelopeVersion>
<ns0:Header>
<ns0:MessageDetails>
<ns0:Class>IR-PAYE-EOY</ns0:Class>
<ns0:Transformation>XML</ns0:Transformation>
<ns0:GatewayTest>1</ns0:GatewayTest>
</ns0:MessageDetails>
</ns0:Header>
<ns0:Body>
http://www.govtalk.gov.uk/taxation/EOY/06-07/1">
<ns1:IRheader>
<ns1:DefaultCurrency>GBP</ns1:DefaultCurrency>
<ns1:Sender>Company</ns1:Sender>
</ns1:IRheader>
</ns1:IRenvelope>
</ns0:Body>
</ns0:GovTalkMessage>
<b>I want the OUTPUT xml in the following format:</b>
<?xml version="1.0" encoding="UTF-8"?>
http://www.govtalk.gov.uk/CM/envelope">
<EnvelopeVersion>2.0</EnvelopeVersion>
<Header>
<MessageDetails>
<Class>IR-PAYE-EOY</Class>
<Qualifier>request</Qualifier>
<Function>submit</Function>
<CorrelationID/>
<Transformation>XML</Transformation>
<GatewayTest>1</GatewayTest>
</MessageDetails>
</Header>
<Body>
http://www.govtalk.gov.uk/taxation/EOY/06-07/1">
<IRheader>
<DefaultCurrency>GBP</DefaultCurrency>
<Sender>Company</Sender>
</IRheader>
</IRenvelope>
</Body>
</GovTalkMessage>
That is basically I need the ns0 and ns1 tags to be removed without affecting the Namespaces
Looking forward for you reply.
Best regards,
Chandan
Message was edited by:
Chandan A C