Recommend this page to a friend! | Stumble It! | Bookmark in del.icio.us |
Classes of Luis Argerich | > | Path Parser | > | path_parser.php | > | Download | ||
|
Download |
<? 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"); } ?> |