1. Go to this page and download the library: Download servo/fluidxml 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/ */
servo / fluidxml example snippets
$book = fluidxml();
$book->add('title', 'The Theory Of Everything')
->add('author', 'S. Hawking')
->add('chapters', true)
->add('chapter', 'Ideas About The Universe', ['id' => 1])
->add('chapter', 'The Expanding Universe', ['id' => 2]);
$book = new FluidXml();
$book->addChild('title', 'The Theory Of Everything')
->addChild('author', 'S. Hawking')
->addChild('chapters', true)
->addChild('chapter', 'Ideas About The Universe', ['id' => 1])
->addChild('chapter', 'The Expanding Universe', ['id' => 2]);
$book->add([ 'title' => 'The Theory Of Everything',
'author' => 'S. Hawking',
'chapters' => [
[ 'chapter' => [
'@id' => '1',
'@' => 'Ideas About The Universe' ] ],
[ 'chapter' => [
'@id' => '2',
'@' => 'The Expanding Universe' ] ],
]]);
fluidxml($domdocument)
->query('/html/body')
->add($simplexml);
// Yes, we merged a DOMDocument with a SimpleXMLElement
// and everything is still fluid.
use function \FluidXml\fluidxml;
use function \FluidXml\fluidns;
use function \FluidXml\fluidify;
use \FluidXml\FluidXml;
use \FluidXml\FluidNamespace;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.