# Using the document type to create the XML tree

The Document data type fits perfectly the conception of defining XML structure as easily as possible. When you need the XML tree structure to map the input or output flow or both, use this type. Then you can import the XML tree structure from various XML sources and edit the tree directly in the mapping editor, thus saving the manual efforts.

### In this section

* [Setting up the Document type](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/setting-up-document-type)
* [Importing the XML tree structure from XML and XSD files](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/importing-xml-tree-structure-from-xml-and-xsd-files)
* [Importing the XML tree structure from the Repository](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/importing-xml-tree-structure-from-repository)
* [Setting or resetting a loop element for an imported XML structure](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/setting-or-resetting-loop-element-for-imported-xml-structure)
* [Adding a sub-element or an attribute to an XML tree structure](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/adding-sub-element-or-attribute-to-xml-tree-structure)
* [Deleting an element or an attribute from the XML tree structure](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/deleting-element-or-attribute-from-xml-tree-structure)
* [Managing a namespace](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/managing-namespace)
* [Grouping the output data](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/grouping-output-data)
* [Aggregating the output data](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-10/aggregating-output-data)