Open and write an XML file.
Requires php-xml
.
- Service:
CleverAge\ProcessBundle\Task\File\Xml\XmlWriterTask
A \DOMDocument
to dump into the file.
Resulting file path.
Code | Type | Required | Default | Description |
---|---|---|---|---|
file_path |
string |
X | Path of the file to write into (relative to symfony root or absolute) | |
mode |
string |
rb |
File open mode (see fopen mode parameter) |
# Task configuration level
my_xml_reader:
service: '@CleverAge\ProcessBundle\Task\File\Xml\XmlWriterTask'
options:
file_path: '%kernel.project_dir%/var/data/file.xml'