You are here: Re: split large xml files « PHP Programming Language « IT news, forums, messages
Re: split large xml files

Posted by David Gillen on 08/10/07 09:21

Bob Bedford said:
> Hi all,
>
> I've an XML file that takes more than the hosting time limit to be readed by
> a PHP script.
>
> What I'd like to do is split the large XML file (can be more than 30MB) in
> little parts and keep the header for every file.
>
> Here is the idea:
>
><total>
> <head>
> </head>
> <info>
> </info>
> <info>
> </info>
> <info>
> </info>
> ...
></total>
>
> The only change is the amount of "info" available. What I'd like is to split
> the file to create littles ones whit the same <head></head> datas but each
> with less <info> tags (say limited to 3 for every file).
>
> It's there any simple way ? This will only be done if the file is bigger
> than 1MB
>
$xml = simplexml_load_file($xmlFile);
And take it from there. Have a quick read of the simplexml docs. You should
have your solution in very little time.

D.
--
Fermat was right.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация