Re: Parsing Large XML files
From: Derek Fountain (nospam_at_example.com)
Date: 03/01/05
- Next message: frizzle: "Re: Mysql select question"
- Previous message: olav_net_at_hotmail.com: "Re: Debugging SOAP Web-Service in php."
- In reply to: doug: "Parsing Large XML files"
- Next in thread: doug: "Re: Parsing Large XML files"
- Reply: doug: "Re: Parsing Large XML files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 01 Mar 2005 19:25:38 +0800
doug wrote:
> How can I parse a large XML file that is to large for memory? I am
> currently using php 5.0.3 and the libxml parser, I would like to read
> it incrementally from a file, but the parser gets the entire contents
> from as String?
The standard XML solution to this problem is to use a SAX parser instead of
a DOM one. However, there doesn't seem to be a SAX parser in the PHP XML
library. One solution appears to be:
http://www.engageinteractive.com/mambo/index.php?option=content&task=view
&id=3628&Itemid=10159
Google might help find others. Or maybe use an external SAX based tool to
boil the XML down to something a bit smaller that you can manipulate from
PHP?
-- The email address used to post is a spam pit. Contact me at http://www.derekfountain.org : <a href="http://www.derekfountain.org/">Derek Fountain</a>
- Next message: frizzle: "Re: Mysql select question"
- Previous message: olav_net_at_hotmail.com: "Re: Debugging SOAP Web-Service in php."
- In reply to: doug: "Parsing Large XML files"
- Next in thread: doug: "Re: Parsing Large XML files"
- Reply: doug: "Re: Parsing Large XML files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|