Open and read an XML file.
Requires php-xml
.
- Service:
CleverAge\ProcessBundle\Task\File\Xml\XmlReaderTask
No input accepted.
A \DOMDocument
built from the file.
Code | Type | Required | Default | Description |
---|---|---|---|---|
file_path |
string |
X | Path of the file to read from (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\XmlReaderTask'
options:
file_path: '%kernel.project_dir%/var/data/file.xml'