#!/usr/bin/php
<?php
/**
 *
 */
error_reportingE_ALL E_STRICT );

$baseDir realpathdirname__FILE__ ) . '/..' );

$incPath get_include_path() . ':' realpath$baseDir '/..' );
set_include_path$incPath );
     
//include_once 'PHPFIT/Parser.php';
include_once '../Parser.php';


//$files   = array();
//$files[] = $baseDir . '/data/arithmetic.html';
//$files[] = $baseDir . '/data/calculator.html';


echo '<pre><br> ' print_r($_POSTtrue ); echo '</pre>';


$parser =   new PHPFIT_Parser();
/*
foreach( $files as $file ) {
    $parser->parse( file_get_contents( $file ) );
    echo "File:  $file \n";
    
    $children = $parser->countChildNodes();
    echo "  tables: $children \n";
    
    
    $node   = $parser->getNodeValue( 'tag', 0 );
    echo "  node: $node \n" ;
    
    $node   = $parser->getNodeValue( 'tag', 0, 1 );
    echo "  node: $node \n" ;
}
*/

//$file = $baseDir . '/data/nmwUserAutonomyTest.html';
$file $baseDir '/data/blubb.html';

$parser = new PHPFIT_Parser();
$parser->parsefile_get_contents$file ) );

//$parser->appendRow( 0 );
//$parser->deleteRow( 0, 9);

/*
$newTest = array( 'blobb', 'blobber', 'blobb@blobber', 'us', 'Blubber', 'blubber123', 'blubber123', 'yes', 'true', 'true', 'true', 'true' );
$i = 0;
$table = 0;
$row = 9;
foreach( $newTest as $string ) {
    $parser->setNodeValue( 'cData', $string, $table, $row, $i++ );
}
//file_put_contents( '../data/blubb.html', $html );
*/


?>