Example #1
0
<?php

use DBAL\XML;
use DBAL\Data\Tree;
$path = 'tests\\test.xml';
$node = new Tree\Node('test');
$attr = array('test' => 'someValue', 'attr' => 2);
$subnode = new Tree\Node('subnode', $attr, $node);
$query = new XML\Query();
$query->build()->update($path)->set($node);
$query->execute();
Example #2
0
<?php

use DBAL;
use DBAL\XML;
use DBAL\Data;
use DBAL\Data\Tree;
$query = new XML\Query();
$query->build()->from('tests\\test.xml');
$results = $query();
var_dump($results);
$it = new Tree\Node\Iterator($results[0]);
$rit = new Tree\Node\IteratorIterator($it);
foreach ($rit as $node) {
    var_dump($node);
}