I want a XSLT program which will transform a XMl a file in a way that will read/extract all attributes from all child nodes(till deep level ) of root node and copy to parent node. Then remove all child nodes. Input xml
enter code here
<root>
<a key="1"/>
<b key1="2">
<c key3="3"/>
</b>
</root>
and output xml would be like this:
<root key="1" key1="2" key3="3" />