1. Go to this page and download the library: Download lucid/xml 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/ */
lucid / xml example snippets
use Lucid\Xml\Parser;
$parser = new Parser;
$parser->parse('<data><foo>bar</foo></data>');
use Lucid\Xml\Parser;
$parser = new Parser;
$parser->parse('/path/to/data.xml');
use Lucid\Xml\Parser;
$parser = new Parser;
$parser->parseDom($dom);
use Lucid\Xml\Parser;
$parser = new Parser;
$parser->parseDomElement($element);
use Lucid\Xml\Parser;
$xml = '<data><node id="1">some text</node></data>'
$parser = new Parser;
$parser->setAttributesKey('__attrs__');
$parser->parse($xml);
$writer->setKeyMap([
'nodeName' => ['id', 'entry'] // nested keys 'id' and 'entry' of the key
element 'nodeName' will be set as attributes instead of childnodes.
]);