views:

5

answers:

0

I need to convert the input xml to output as shown below

Input

<root>
          <MOD_FACTOR>10</MOD_FACTOR>
          <X_MOD_FACTOR>20</X_MOD_FACTOR>
</root>

Ouput
------
<root>
          <Data>
                   <Name> MOD_FACTOR</Name>
                   <Value>10</Value>
          </Data>
<Data>
                    <Name>X_MOD_FACTOR</Name>
                   <Value>20</Value>
          </Data>
</root>

What is the best way to do this?