I have to fill this XML structure with answers from a form:
<map_raggi>
<map_raggio>
<indirizzo>
<![CDATA[ Viale matteotti, Firenze ]]>
</indirizzo>
<latitudine>43,78812</latitudine>
<longitudine>11,24871</longitudine>
<raggio>1</raggio>
</map_raggio>
<map_raggio>
<indirizzo>
<![CDATA[ Viale dei Mille, Firenze ]]>
</indirizzo>
<latitudine>43,7870808</latitudine>
<longitudine>11,269691899999998</longitudine>
<raggio>0.5</raggio>
</map_raggio>
</map_raggi>
There can be 1 to 3 map_raggio elements.
I can’t use an if within the Create XML module.
So, I was thinking to build a collection that correctly maps to the XML and map the connection to the map_raggio element.
I’ve done it for another node, but it has a much simpler structure.
This is the data structure I’m using to create the XML
Does it mean I have to create an array containing 4 key-value pairs, for indirizzo, latitudine, logitudine, raggio?