Re: Problem With XML Parser Objects

From: Date: Thu, 31 Aug 2000 06:31:54 +0000
Subject: Re: Problem With XML Parser Objects
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-31380@lists.php.net to get a copy of this message
Jon Parise wrote: > On Wed, Aug 30, 2000 at 02:02:25PM -0400, John.Woolbright wrote: > > > I was running a version of the php code that allowed the callback > > functions of the xmlparser to be wrapped in side an object declaration. > > the new 4.0.2 seems to be having a problem with this. Is this still > > supported in 4.0.2 > > If you're using xml_set_object(&$this), you'll need to change it to > xml_set_object($this) (the reference has been removed). > This solution doesn't seem to work, I'm still receiving errors like: Warning: Unable to call handler tag_open() in /mnt/img/local/apache/htdocs/map.lassie.sandino.net/include/map-xml.inc on line 27 Warning: Unable to call handler null_function() in /mnt/img/local/apache/htdocs/map.lassie.sandino.net/include/map-xml.inc on line 27 Warning: Unable to call handler tag_open() in /mnt/img/local/apache/htdocs/map.lassie.sandino.net/include/map-xml.inc on line 27 Warning: Unable to call handler null_function() in /mnt/img/local/apache/htdocs/map.lassie.sandino.net/include/map-xml.inc on line 27 Lines 19-29: function map_xml_image_parser () { $this->parser = xml_parser_create(); xml_set_object($this->parser,$this); xml_set_element_handler($this->parser,"tag_open","null_function"); xml_set_character_data_handler($this->parser,"null_function"); } function parse($data) { xml_parse($this->parser,$data); } 27 is xml_parse($this->parser,$data); Functions tag_open and null_function do exist in the class. -- Sandino Araico Sánchez Technology Prostitute: A technology prostitute is a software coder who will program anything for money. Programming language, operating system or morality of the company who wants the coded project are of minor importance compared to the paycheck. -- Brian Kirkby

« previous php.dev (#31380) next »