X4 Produktdokumentation

Operation: AppendFile

The Append File operation appends the data from the previous process step to the destination file in the X4 Repository defined in path parameter.

If the target file defined in the

path parameter does not exist, a file will be created.

Examples

Beispiel_ProjectAccess_AppendFile.png

The following example shows a sample parameterization of the adapter for the Append File operation to append the data from the previous process step to the destination file defined in path parameter.

Parameters

Value

path

Resources/File.xml

Target file

XML
<?xml version="1.0" encoding="UTF-8"?>
<Cars>
	<Car>
		<Brand>Audi</Brand>
		<Country>Germany</Country>
	</Car>
</Cars>

Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<Cars>
	<Car>
		<Brand>BMW</Brand>
		<Country>Germany</Country>
	</Car>
	<Car>
		<Brand>Hyundai</Brand>
		<Country>South Korea</Country>
	</Car>
</Cars>

Output

XML
<?xml version="1.0" encoding="UTF-8"?>
<Cars>
    <Car>
        <Brand>Audi</Brand>
        <Country>Germany</Country>
    </Car>
</Cars><?xml version="1.0" encoding="UTF-8"?>
<Cars>
    <Car>
        <Brand>BMW</Brand>
        <Country>Germany</Country>
    </Car>
    <Car>
        <Brand>Hyundai</Brand>
        <Country>South Korea</Country>
    </Car>
</Cars>


The output is not a valid XML file. The output must be transformed into a valid XML file using a mapping.