OO XML Parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I've been playing around a bit with the XML parser in PHP, but I couldn't figure out, how to get it object oriented.

I would like to do something like this:

class MyParser {

private function xml_start_element(...) {
}

private function xml-stop_element(...) {
}

public function parse() {
[start stuff]
xml_set_element_handler($parser, "xml_start_element", "xml_stop_element"); //can't find function
[end stuff]
}

}

This ends up in an error, which says it can't find the function "xml_start_element()" since it doesn't take the member fuction as an argument. I've tried some stuff like setting "$this->start" as callback, but it didn't work either.

Has anyone of you a solution to this problem? I just can't find any myself.

thanks,
Norbert 
             

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux