Re: XML_Parser question
| From: | Manuel Lemos | Date: | Fri, 20 Jul 2001 16:53:46 +0000 |
| Subject: | Re: XML_Parser question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-211@lists.php.net to get a copy of this message | ||
Hello,
Andrei Zmievski wrote:
>
> When using a class derived from XML_Parser, is there a way to stop the
> parsing process when inside startHandler() and have the parsing function
> return an error object?
No, AFAIK expat parser callbacks functions are not supposed to return
any sort of status values to expat. So, what you need to do is to flag
in the class that there was a previous error and in that case return
immediately from parser callback functions.
You may want to look into this generic XML parser class that already
takes care of that in case of error.
http://phpclasses.UpperDesign.com/browse.html/package/4
Manuel Lemos