AW: AW: [PEAR-DEV] PACKAGE PROPOSAL: XML_XMLPull
| From: | Stephan Schmidt | Date: | Sat, 13 Sep 2003 19:28:52 +0000 |
| Subject: | AW: AW: [PEAR-DEV] PACKAGE PROPOSAL: XML_XMLPull | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21478@lists.php.net to get a copy of this message | ||
Hi,
> class XML_Pull extends XML_Parser {
> var $stack = array();
> var $i = 0;
> function &parse() {
> return @$this->stack[++$this->i];
> }
Will be working, but could be done better :-)
With large files, you are building a huge array before you get any
events back. You can get some memory problems doing this...
> I was reffering to the Stream_Var package.
I know what you were talking about, but the streams Harry is using is
already in PEAR in his XML_SaxFilters package, take a look at
XML/SaxFilters/IO/StringReader.php
Stephan