Create safe xml data. Removes dangerous characters for string.
$ xml_safe = XML ::safe ($ xml_unsafe );
$ xml_file = XML ::loadFile ('path/to/file.xml ' );
$ users = new Table ('table_name ' );
Table::create ('table_name ' , array ('field1 ' , 'field2 ' ));
Table::drop ('table_name ' );
$ table = Table::get ('table_name ' );
Get information about table
var_dump ($ users ->info ());
var_dump ($ users ->fields ());
$ users ->addField ('test ' );
$ users ->deleteField ('test ' );
$ users ->insert (array ('login ' =>'admin ' , 'password ' =>'pass ' ));
Select record(s) in table
$ records = $ users ->select ('[id=2] ' );
$ records = $ users ->select (null , 'all ' );
$ records = $ users ->select (null , 'all ' , null , array ('login ' ));
$ records = $ users ->select (null , 2 , 1 );
Delete current record in table
Delete with xPath query record in xml file
$ users ->deleteWhere ('[id=2] ' );
Update record with xPath query in XML file
$ users ->updateWhere ('[id=2] ' , array ('login ' =>'Admin ' , 'password ' =>'new pass ' ));
Update current record in table
$ users ->update (1 , array ('login ' =>'Admin ' ,'password ' =>'new pass ' ));