PHP Newbie Classes / XML Question

From: Date: Fri, 22 Mar 2002 21:19:42 +0000
Subject: PHP Newbie Classes / XML Question
Groups: php.dev 
Request: Send a blank email to php-dev+get-81625@lists.php.net to get a copy of this message
I am very new to PHP and have what is probably a dumb question. I am attempting to parse an XML document with a Class. But, you have to use "xml_set_element_handler" for this to work and that means you have to pass it the names of your element handlers. How do I do this in a class??? For example, this does not work: xml_set_element_handler($parser, "this->startElementHandler", "this->endElementHandler"); as I get this error: Warning: Unable to call handler this->startElementHandler() in C:\Inetpub\wwwroot\PHP\stdqclass.php on line 31 If I remove the "this->" I get the exact same error only without the "this->". I want the class to handle the XML totally on its own, but I am cannot figure out how to pass the xml_set_element_handler function a reference to my event handlers. Can this be done from within a class and if so, how do I pass my event handlers? Thanks, -- Brian

« previous php.dev (#81625) next »