topical media & game development

talk show tell print

server-php-xml-class-path-parser-path-parser.php / 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"); 
  }
  ?>


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.