# Creating a dynamic XML structure

Create a structure and use the XPath Name to match all possible elements in different input files.

## Procedure

1. Create an XML file with the following content and save it on your machine:
   ```
   <root>
   	<level1>
   		<level2/>
   		<level2/>
   	</level1>
   	<level1>
   		<level2/>
   		<level2/>
   	</level1>
   </root>
   ```
2. In Talend Data Mapper, create a structure based on your XML file.

   For more information, see [Creating a structure from a sample document](https://help.qlik.com/talend/en-US/data-mapper-user-guide/8.0/creating-structure-from-sample-document).
3. Once the structure is created and opens in the editor, click the Read Only drop-down list and select Editable.
4. Click the level1 element, scroll down to the XPath Name property and enter child::\*.

   This indicates that the level1 structure element can refer to any child element of the root element, regardless of the element name. ![XPath Name property tab.](https://help.qlik.com/talend/en-US/data-mapper-user-guide/Resources/images/create_dynamic_xml_structure_01_level1.png)
5. Repeat the previous step for the level2 element.

## Results

Your structure is created and configured, you can now use it in a map and see how it handles different elements.