A console based application to parse XML data and converts to various formats Mainly JSON, CSV etc. Easly implement other formats with reusable/extensible code.
composer install
chmod +x ./run
| php ./run export
Example:
Remote option:
curl -s http://a.cdn.searchspring.net/help/feeds/searchspring.xml | php ./run export csv
curl -s http://a.cdn.searchspring.net/help/feeds/searchspring.xml | php ./run export json
cat path/filename.xml | php ./run export csv
cat path/filename.xml | php ./run export json
Edit phpunit.xml env attribute to relevent values
run vendor/bin/phpunit
Known Issue, some test cases expects STDIN. To run them
use curl -s http://a.cdn.searchspring.net/help/feeds/searchspring.xml | vendor/bin/phpunit
Tested in Linux Environment
PHP version 8.1 with CURL enabled