Re: stream_read function for registered wrapper class.
| From: | Adam Richardson | Date: | Wed, 19 Sep 2012 16:47:59 +0000 |
| Subject: | Re: stream_read function for registered wrapper class. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319145@lists.php.net to get a copy of this message | ||
On Wed, Sep 19, 2012 at 12:43 PM, Rob <rob_adams@hotmail.com> wrote:
> I have a very large XML file that I have to process. It's about 7 GB.
> Some of the individual elements that I need are larger than 8192 bytes.
> I'm trying to write a Stream wrapper class to give me a specific element
> at a time, but I keep running into issues with the stream wrapper and
> fread, stream_get_content functions.
You could just use the XML Parser (SAX) as it doesn't require loading
the entire document into memory:
http://php.net/manual/en/book.xml.php
Adam
--
Nephtali: A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com