1. Go to this page and download the library: Download jpuck/etl 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/ */
jpuck / etl example snippets
$xml = file_get_contents("sample.xml");
$xml = new XML($xml);
$schema = $xml->schema();
// normal JSON_PRETTY_PRINT
echo $schema;
$schemas []= new Schema('myschema.php');
$schemas []= new Schema('myschema.json');
$schemas []= new Schema($schema->toArray());
$schemas []= new Schema($schema->toJSON());
$schemas []= new Schema($schema->toJSON(JSON_PRETTY_PRINT));
foreach($schemas as $s){
var_dump($schema == $s);
}
$schema = new Schema('myschema.json');
$xml = file_get_contents("sample.xml");
$xml = new XML($xml, $schema);