Setting up the Document type
About this task
The Document data type is one of the data types provided by Talend . This Document type is set up when you edit the schema for the corresponding data in the Schema editor. For further information about the schema editor, see Using the Schema Editor.
The following figure presents an example in which the input flow, Customer, is set up as the Document type. To replicate it, in the Map editor, you can simply click the [+] button to add one row on the input side of the Schema editor, rename it and select Document from the drop-down list of the given data types.
In practice for most cases, tXMLMap retrieves the schema of its preceding or succeeding components, for example, from a tFileInputXML component or in the ESB use case, from a tESBProviderRequest component. This avoids many manual efforts to set up the Document type for the XML flow to be processed. However, to continue to modify the XML structure as the content of a Document row, you need still to use the given Map editor.
-
The root element: it is the minimum element required by an XML tree to be processed and when needs be, the foundation to develop a sophisticated XML tree.
-
The loop element: it determines the element over which the iteration takes place to read the hierarchical data of an XML tree. By default, the root element is set as loop element.
This figure gives an example with the input flow, Customer. Based on this generated XML root tagged as root by default, you can develop the XML tree structure of interest.
To do this, you need to: