# How to create a collection that maps to this complex XML?

**URL:** <https://community.make.com/t/how-to-create-a-collection-that-maps-to-this-complex-xml/76157>\
**Category:** Questions\
**Tags:** data-types\
**Created:** [March 24, 2025, 8:39am UTC](https://community.make.com/t/how-to-create-a-collection-that-maps-to-this-complex-xml/76157 "2025-03-24T08:39:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlbertoCabasVidani](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/albertocabasvidani/32/31601_2.png) [@AlbertoCabasVidani](https://community.make.com/u/AlbertoCabasVidani)\
**Post date:** [March 24, 2025, 8:39am UTC](https://community.make.com/t/how-to-create-a-collection-that-maps-to-this-complex-xml/76157/1 "2025-03-24T08:39:23Z")

</div>

I have to fill this XML structure with answers from a form:

```auto
<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

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/a/ea0fbb167d6c3c71a562669815f593adc0cb3518.png)

Does it mean I have to create an array containing 4 key-value pairs, for indirizzo, latitudine, logitudine, raggio?

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [June 22, 2025, 7:42am UTC](https://community.make.com/t/how-to-create-a-collection-that-maps-to-this-complex-xml/76157/3 "2025-06-22T07:42:30Z")

</div>


