Hi experts,
My input XML is :
<?xml version="1.0" encoding="UTF-8"?>
<getResponse xmlns="https://test.com">
<ReturnMessage>
<recordCount/>
<returnCode/>
<returnMessage/>
</ReturnMessage>
</getResponse>
Here if you see that none of the nodes have any namespace prefix nor the child nodes.
What I want is, prefix and namespaces for all nodes. Also the prefix and namespace for root and immediate child node is same ns0 while for other nodes it is ns1.
ns0 and ns1 namespaces are different.
How can I get this in XSLT?
Is there any simple way? Please help!
Desired output XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:getResponse xmlns:ns0="https://test.com">
<ns0:ReturnMessage>
<ns1:recordCount xmlns:ns1="https://test.com/schema/"/>
<ns1:returnCode xmlns:ns1="https://test.com/schema/"/>
<ns1:returnMessage xmlns:ns1="https://test.com/schema/"/>
</ns0:ReturnMessage>
</ns0:getResponse>
Thanks
Gopal