Hi,

Use xml_set_object, and away you go. Perhaps you would benefit from using PEAR's XML_Parser or XML_Transformer, or even PEAR's HTTP_Request class.

http://php.net/xml_set_object
http://pear.php.net/xml_parser
http://pear.php.net/xml_transformer
http://pear.php.net/http_request

Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org

Robert Fitzpatrick wrote:
I have a class that receives an XML response from a HTTP request and I am
trying to parse the XML after receiving it. The problem I'm having is the
error when trying to use xml set handlers, such as
'xml_set_element_handler'. It seems the class is having trouble seeing the
handler functions. For instance, if I set this:

xml_set_element_handler($xml_parser, 'startElement','endElement');

Then I receive the error 'Unable to call handler startElement()', I tried to
put $this-> in front of the names of the functions, but same thing. Can
someone show me how to use these handlers in a class?

--
Robert





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



Reply via email to