If I have an XML file that looks like this:
<properties>
<property>
<picture>http://example.com/image1.jpg</picture>
<picture>http://example.com/image2.jpg</picture>
<picture>http://example.com/image3.jpg</picture>
<picture>http://example.com/image4.jpg</picture>
<picture>http://example.com/image5.jpg</picture>
</property>
</properties>
How would I go about transforming it to where each picture URL element is unique like this:
<properties>
<property>
<picture1>http://example.com/image1.jpg</picture1>
<picture2>http://example.com/image2.jpg</picture2>
<picture3>http://example.com/image3.jpg</picture3>
<picture4>http://example.com/image4.jpg</picture4>
<picture5>http://example.com/image5.jpg</picture5>
</property>
</properties>
Am I correct in assuming that there must be the same amount of elements per even if some of the elements contain empty values (the number of picture URLs does vary by property)?