PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Nov 26, 2014 1:29 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Huge XML file HELP!
PostPosted: Wed Nov 02, 2011 3:58 pm 
Offline
Forum Newbie

Joined: Sat Sep 24, 2011 12:36 pm
Posts: 8
Hey,

I really need your help
I have this large 22GB XML file data I scraped and I need to replace some strings in it.
The problem is I tried several of XML editors and only one actually managed to only open the file (EmEditor). When I started to replace, it got stuck and closed (tried it many times).
I think I need a program that only opens part of the file each time replaces the string and then opens the next part and replaces the same string etc...

Can anyone help please?

Thanks in advance ;)


Top
 Profile  
 
 Post subject: Re: Huge XML file HELP!
PostPosted: Thu Nov 03, 2011 3:46 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6433
Location: 53.01N x 112.48W
Not sure about what desktop applications you can use. I'd guess pretty much anything will croak on a 22GB file.

There is a PHP library, XMLReader, that iterates through an XML file one node at a time, rather than loading the whole file into memory at once - which sounds like what you want.

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
 Post subject: Re: Huge XML file HELP!
PostPosted: Thu Nov 10, 2011 11:12 am 
Offline
Forum Newbie

Joined: Thu Nov 10, 2011 10:47 am
Posts: 1
The problem is in the size of your file (22GB is no joke). Try this XMLReader, it might help you.


Top
 Profile  
 
 Post subject: Re: Huge XML file HELP!
PostPosted: Thu Nov 10, 2011 11:14 am 
Online
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 3786
Location: Montreal, Canada
split()?

_________________
Stay on top of upgrades.
Supported PHP versions
No longer supported versions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group