Converting when the XML record unit is set to "Element"
If an input file is in XML format, and XML record unit is set to Element, you can specify a different hierarchy level as a record for each condition.
This section describes the data that is output for each extraction condition (in CSV format), taking as examples the following input file (XML format), schema file, and XML information tree:

Figure 4.66 Input file

Figure 4.67 Schema file

Screen 4.33 XML information tree
(1) When the extraction condition is Element = "C1"
Set up mapping as shown below. Specify for the mapping to be repeated.

Screen 4.34 Mapping information
When the input file is processed, processing proceeds as follows:
1. The first output data is set to the element "C1", so "c1" is output.
2. Next, the elements between <CC1> and </CC1> are output as the child elements of the element "C1", so "data4" and "data5" are output. These elements become the first record.
3. The element "C1" has been set with repetitions, so the second elements between <C1> and </C1> are output."c2" is output as the leading data of the second record.
4. Next, the elements between <CC1> and </CC1> are output as the child elements of the element "C1", so "data13" and "data14" are output. These elements become the second record.
The output file is as follows:

Figure 4.68 Output file
(2) When the extraction condition is Element = "CC1"
Set up mapping as shown below. Specify for the mapping to be repeated.

Screen 4.35 Mapping information
When the input file is processed, the process works as follows:
1. The first output data is from the mapped element <C1>, so "c1" is output.
2. Next, Element = "CC1" has been specified as the extraction condition, so the child elements between <CC1> - </CC1>, i.e. <CCC1> - </CCC1> and <CCC2> - </CCC2> are output. Therefore, "data4" and "data5" are output. These elements become the first record.
3. Element = "CC1" has been set with repetitions, so the elements between <CCC1> - </CCC1> and <CCC2> - </CCC2> are output for the number of input data. Then "c1", which is the value of <C1> mapped to the first record, is output, and then "data7" and "data8" are output as the second record.
4. Outputting the values of the first <C1> ends here, so the value of the second <C1>, "c2", is output.
5. Element = "CC1" has been specified as the extraction condition, so the child elements between <CC1> - </CC1>, i.e. <CCC1> - </CCC1> and <CCC2> - </CCC2> are output. Therefore, "data13" and "data14" are output.
6. Element = "CC1" has been set with repetitions, so, as in 3. above, the elements between <CCC1> - </CCC1> and <CCC2> - </CCC2> are output for the number of input data. Then "c2", which is the value of <C1> mapped to the first record, is output, and then "data16" and "data17" are output as the second record.
The output file is as follows:

Figure 4.69 Output file
(3) If you mapped the higher level than the element specified with the extraction condition Element = "C1"
If the XML record unit is set to Element, you can map the attributes defined for the higher or lower level than the specified element, to process any elements in other levels than specified as the input data.
Set up mapping as shown below. Specify for the mapping to be repeated.

Screen 4.36 Mapping information
When the input file is processed, the process works as follows:
1. The first output data is from the mapped element "B1", so "data3" is output.
2. Then, because element "C1" is mapped, "c1" is output.
3. Next, the elements between <CC1> and </CC1> are output as the child elements of the element "C1", so "data4" and "data5" are output. Elements in 2. and 3. become the first record of the element "C1".
4. Next, because of element "B1" of the input data, "data12" is output as the leading data of the second record.
5. The element "C1" has been set with repetitions, so the second elements between <C1> and </C1> are output."c2" is output as the leading data of the repetition.
6. Next, the elements between <CC1> and </CC1> are output as the child elements of the element "C1", so "data13" and "data14" are output. These elements become the second record.
The output file is as follows:

Figure 4.70 Output file