1. Go to this page and download the library: Download halilim/xml-iterator 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/ */
halilim / xml-iterator example snippets
use XmlIterator\XmlIterator;
$it = new XmlIterator("http://api.example.com/products.xml", "product");
foreach ($it as $k => $v) {
// Do something with each row ($v), save it to db, echo it, etc. E.g.:
// echo $k . " => " . var_export($v, true) . "\n\n";
}