PHP code example of digitalkaoz / xml-filter
1. Go to this page and download the library: Download digitalkaoz/xml-filter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
digitalkaoz / xml-filter example snippets
[
'bazz' => [
'foo' => 'foo',
],
'bar' => [10, 20, 30]
]
$filter = \Rs\XmlFilter\XmlFilter::create();
$doc = $filter::load(file_get_contents('https://news.google.de/?output=rss'));
$config = new \Rs\XmlFilter\Loader\YamlLoader(__DIR__ . '/rss.yml');
$result = $filter->filter($doc, $config);
echo json_encode($result, JSON_PRETTY_PRINT);