Re: PACKAGE PROPOSAL: XML_XMLPull
| From: | Jesus M. Castagnetto | Date: | Fri, 12 Sep 2003 23:28:51 +0000 |
| Subject: | Re: PACKAGE PROPOSAL: XML_XMLPull | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21455@lists.php.net to get a copy of this message | ||
Code looks good, and the idea of having an XML Pull parser is great (something
I was missing in PEAR/PHP).
Just some problems w/ the code:
- You refer to 'XmlPull' in several require_once() statements, but the name of
the dir is 'XMLPull'. I am including the diff below.
- You refer to 'HTMLSaxPushListener.php', but the file is
'HtmlSaxPushListener.php', a rename of the file should fix that.
Overall, with the simple fixes mentioned, I would like to see this package in
PEAR. I'll look forward for when you call for a vote (right now we are in the
proposal phase of the process).
Had looked at the code, but not in great detail, as first I need to understand
exactly how the pull parsing works.
Great job Harry.
--- Harry Fuecks <hfuecks@phppatterns.com> wrote:
> Would like to propose PEAR::XML_XMLPull, which is a pull based API for
> parsing XML, that (arguably) makes it alot easier to parse XML. I've
> prepared a PEAR package (0.1.0rc1) here:
>
> http://sourceforge.net/project/showfiles.php?group_id=87488&release_id=184205
>
> - you need to have PEAR::XML_SaxFilters 0.2.0 installed first to run the
> example.
>
> Essentially what XMLPull does is eliminate the need for handler functions
> (as with the SAX API) and rather deal with something like a switch
> statement, e.g.;
>
> while ( $event = $parser->parse() ) {
> switch ( $type = $event->getType() ) {
> case XML_PULL_START_TAG:
> // Start tag handled here
> break;
> case XML_PULL_END_TAG:
> // End tag handled here
> break;
> case XML_PULL_TEXT:
> // Character data handled here
> break;
> }
> }
>
> There's more info on XML Pull at http://www.xmlpull.org
> (the API I've
> defined only loosely conforms to the Java API described there).
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--
Jesus M. Castagnetto (jcastagnetto@yahoo.com)
Research: http://metallo.scripps.edu/
Personal: http://www.castagnetto.org/
PEAR stuff: http://pear.php.net/user/jmcastagnetto
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com