X4 Produktdokumentation

Operation: Append File

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

If the target file defined in the path parameter does not exist, a file will be created.

Examples

Beispiel_WriteFile.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

C:\MyFolder\File.xml

addNewline

Auto

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.