Hello, I am looking for an XML conversion to a desired output.<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Input XML:
<properties>
<entry>
<key>first_node/P_NODE</key>
<value>
<genericData>
<identifier>first_node/P_NODE</identifier>
<properties>
<entry>
<key>second_node</key>
<value>2</value>
</entry>
<entry>
<key>third_node/fourth_node/fifth_node</key>
<value>345</value>
</entry>
<entry>
<key>sixth_node/seventh_node</key>
<value>67</value>
</entry>
<entry>
<key>eigth_node</key>
<value>8</value>
</entry>
<entry>
<key>ninth_node</key>
<value>
<genericData>
<identifier>ninth_node</identifier>
<properties>
<entry>
<key>tenth_node</key>
<value>10</value>
</entry>
<entry>
<key>eleventh_node/twelveth_node</key>
<value>1112</value>
</entry>
</properties>
</genericData>
</value>
</entry>
</properties>
</genericData>
</value>
</entry>
<entry>
<key>tirteenth_node</key>
<value>
<genericData>
<identifier>tirteenth_node</identifier>
<properties>
<entry>
<key>fourteenth_node</key>
<value>14</value>
</entry>
<entry>
<key>fifteenth_node/sixteenth_node</key>
<value>1516</value>
</entry>
</properties>
</genericData>
</value>
</entry>
<entry>
<key>seventeeth_node/eighteenth_node</key>
<value>1718</value>
</entry>
<entry>
<key>nineteenth_node/twenth_node</key>
<value>1920</value>
</entry>
<entry>
<key>twentyfirst_node</key>
<value>21</value>
</entry>
</properties>
Desired Output:
<properties>
<first_node>
<P_NODE>
<second_node>2</second_node>
<third_node>
<fourth_node>
<fifth_node>345</fifth_node>
</fourth_node>
</third_node>
<sixth_node>
<seventh_node>67</seventh_node>
</sixth_node>
<eigth_node>8</eigth_node>
<ninth_node>
<tenth_node>10</tenth_node>
<eleventh_node>
<twelveth_node>1112</twelveth_node>
</eleventh_node>
</ninth_node>
</P_NODE>
</first_node>
<tirteenth_node>
<fourteenth_node>14</fourteenth_node>
<fifteenth_node>
<sixteenth_node>1516</sixteenth_node>
</fifteenth_node>
</tirteenth_node>
<seventeeth_node>
<eighteenth_node>1718</eighteenth_node>
</seventeeth_node>
<nineteenth_node>
<twenth_node>1920</twenth_node>
</nineteenth_node>
<twentyfirst_node>21</twentyfirst_node>
</properties>
Need and XSLT stylesheet to get the desired output. Kindly Help.