blob: 30c2b0f7ea923b16b16a96a635021075ddda0f32 [file] [log] [blame]
<?php
require_once 'tutorial_autoload.php';
$store = new ezcTreeXmlInternalDataStore();
$tree = ezcTreeXml::create( 'files/royals.xml', $store );
$tree->autoId = true;
$rootNode = $tree->createNode( null, 'Beatrix' );
$tree->setRootNode( $rootNode );
$willem = $tree->createNode( null, 'Willem-Alexander' );
$rootNode->addChild( $willem );
$friso = $tree->createNode( null, 'Friso' );
$rootNode->addChild( $friso );
echo $friso->id, "\n";
$willem->addChild( $tree->createNode( null, 'Catharina' ) );
$willem->addChild( $tree->createNode( null, 'Alexia' ) );
$willem->addChild( $tree->createNode( null, 'Ariane' ) );
$friso->addChild( $tree->createNode( null, 'Luana' ) );
$friso->addChild( $tree->createNode( null, 'Zaria' ) );
?>