Location: PHPKode > scripts > Path Parser > path-parser/path_parser.php
<?
include_once("class_path_parser.php");

function name($name,$attribs,$content) {
  print("<br/>");
  print("Hey $name <br/>\n");
  print_r($attribs);
  print("<br/>");
}

$parser = new Path_parser();
$parser->set_handler("/foo/data/name","name");
$parser->set_handler("/foo/data","name");
$parser->set_handler("/foo/data/type/var","name");
if(!$parser->parse_file("foo.xml")) {
  print("Error:".$parser->get_error()."<br/>\n"); 
}
?>
Return current item: Path Parser