XML : Convert xml values to attributes

Is there anyway of converting an xml so that the values within each element become attributes of that element e.g

  <example>    <abc>12</abc>    <def>hello</def>  </example>    

becomes:

  <example>    <abc val=12/>    <def val=hello/>  </example>    

but everything else is left the same

No comments:

Post a Comment