Re: Function variabes and classes
| From: | Frederik Strauss | Date: | Tue, 13 Jun 2000 19:29:40 +0000 |
| Subject: | Re: Function variabes and classes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1747@lists.php.net to get a copy of this message | ||
On Tue, Jun 13, 2000 at 07:13:56PM +0000, Thomas Hurst wrote:
> Hi.
>
> I'm trying to use the xml parser inside a class, but I don't seem to be able
> to set class methods as handlers, ala:
>
> xml_set_element_handler($this->parser, "\$this->startElement",
> "\$this->endElement");
after doing your $this->parser = xml_parser_create(); you need
to do a
xml_set_object($this->parser,&$this);
it seems that xml_set_object is only available from php4.
Cheers
Fred
--
Frederik Strauss +27-82-468-4679
Obsidian Systems http://www.obsidian.co.za