View Single Post
  #1 (permalink)  
Old June 7th, 2018, 11:18 PM
smok.hcl@gmail.com smok.hcl@gmail.com is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question element text to element name xslt

I want to convert element text to element name. I may sound wierd. let me give an example

<root>
<repeat>
<a1>header1</a1>
<a2>header2</a2>
<a3>header3</a3>
</repeat>
<repeat>
<a1>value11</a1>
<a2>value12</a2>
<a3>value13</a3>
</repeat>
<repeat>
<a1>value21</a1>
<a2>value22</a2>
<a3>value23</a3>
</repeat>
</root>


expected output

<root>
<repeat>
<header1>value11</header1>
<header2>value12</header2>
<header3>value13</header3>
</repeat>
<repeat>
<header1>value21</header1>
<header2>value22</header2>
<header3>value23</header3>
</repeat>
</root>

Please help.
Reply With Quote