1. Go to this page and download the library: Download jgswift/xral 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/ */
$file = new qio\File('library.xml');
$query = new XML\Simple();
// set the author of a specific book
$query->select('library/books/book')
->update($file)
->set('author','Stephen King')
->where('name','The Langoliers');
$query();
$file = new qio\File('library.xml');
$query = new XML\Simple();
$query->select('/library/books')
->update($file)
->insert(['book' => [
'name' => 'The Catcher In The Rye',
'authors' => [
'author' => 'J. D. Salinger'
],
'ISBN' => '0316769533 9780316769532',
'publisher' => 'Amazon',
'pages' => 277
]]);
$query();
$file = new qio\File('library.xml');
$query = new XML\Simple();
$query->delete('//book')
->update($file)
->where('name','The Catcher In The Rye');
$query();
$file = new qio\File('config.ini');
$query = new INI\Query();
// update debug setting in general section to 1
$query->update($file)
->section('general')
->set('debug',1);
$query();
$file = new qio\File('config.ini');
$query->update($file)
->section('general')
->insert('name','My Application');
$query();
$file = new qio\File('config.ini');
$query = new INI\Query();
$query->update($file)
->section('general')
->delete('name');
$query();