Here is my XML :
<root>
<parameters>
<parameter>
<key>sEmail</key>
<value>cauchyjp@gmail.com</value>
<type>string</type>
<length>255</length>
</parameter>
<parameter>
<key>sFirstName</key>
<value>Bill</value>
<type>string</type>
<length>40</length>
</parameter>
</parameters>
<root>
I want to retrieve the value of the key sEmail and add it as an attribute to the root element using XML to XML xslt.
Here is the result expected :
<root email="cauchyjp@gmail.com">
<parameters>
<parameter>
<key>sEmail</key>
<value>cauchyjp@gmail.com</value>
<type>string</type>
<length>255</length>
</parameter>
<parameter>
<key>sFirstName</key>
<value>Bill</value>
<type>string</type>
<length>40</length>
</parameter>
</parameters>
<root>
Something similar to this link but with value of element instead of attributes.
Can someone help me ? Thanks