Help me to trasform xml in another xml
Posted: Tue Dec 22, 2015 5:56 pm
How can I transfom this xml:
in this xml:
Help me. Please.
Code: Select all
<Objects>
<object>
<Property Name="bname">Peter</Property>
<Property Name="age">12</Property>
<Property Name="color">
<Property>Blu</Property>
<Property>Red</Property>
<Property>Green</Property>
</Property>
</Object>
<object>
<Property Name="bname">Samuel</Property>
<Property Name="age">20</Property>
<Property Name="color">
<Property>Yellow</Property>
<Property>Red</Property>
</Property>
</Object>
</Objects>
Code: Select all
<Objects>
<object>
<bname>Peter</bname>
<age>12</age>
<colorAttr>
<attrColor colName="color">Blu</attrColor>
<attrColor colName="color">Red</attrColor>
<attrColor colName="color">Green</attrColor>
</colorAttr>
</Object>
<object>
<bname>Samuel</bname>
<age>20</age>
<colorAttr>
<attrColor colName="color">Yellow</attrColor>
<attrColor colName="color">Red</attrColor>
</colorAttr>
</Object>
</Objects>
Help me. Please.