We have a big XML for order and we have to parse it. Some of the order attributes coming as <custom-attribute attribute-id="attibute-id">some value</custom-attribute>. We are parsing this XML through SSIS and it's having issue retrieving value of these attributes. We noticed that if we add a value, it works <custom-attribute attribute-id="attibute-id"><value>some value</value></custom-attribute>
So, before parsing the XML using SSIS, is there any way we add <value> tag on all <custom-attribute> elements as shown below using python:
Current XML:
<custom-attributes>
<custom-attribute attribute-id="color">BLACK</custom-attribute>
<custom-attribute attribute-id="colorDesc">BLACK</custom-attribute>
</custom-attributes>
Transformed XML:
<custom-attributes>
<custom-attribute attribute-id="color">
<value>BLACK</value>
</custom-attribute>
<custom-attribute attribute-id="colorDesc">
<value>BLACK</value>
</custom-attribute>
</custom-attributes>
Thanks