I am trying to work with fluidxml to test if I can use it, but I cant get it to start working, I am using codeigniter framework. I cloned the repo https://github.com/servo-php/fluidxml and added it to a folder I created called thirdparty. Then here is the code for the function
public function xmltrial(){
$this->load->helper('file');
require_once(APPPATH.'third_party/fluidxml/source/FluidXml.php');
$book = new FluidXml();
$book->add([ 'title' => 'The Theory Of Everything',
'author' => 'S. Hawking',
'chapters' => [
[ 'chapter' => [
'@id' => '1',
'@' => 'Ideas About The Universe' ] ],
[ 'chapter' => [
'@id' => '2',
'@' => 'The Expanding Universe' ] ],
]]);
echo $book;
}
So I am getting two errors , one is Fatal error: Class 'FluidXml' not found even and the second one is if I use use function \FluidXml\fluidxml;
use function \FluidXml\fluidns;
use function \FluidXml\fluidify;
all this character inside my xmltrial function it shows a red error on them.