Reply to Re: most efficient XML parser for PHP

Your name:

Reply:


Posted by Anze on 02/01/08 20:50

>> Options I have found:
>> a) DOM - not suitable because of 3)
>> b) SAX
>> c) pull parsers
>>
> Have you looked into SimpleXML? Its a native built in XML Parser in
> PHP5, so of course the performance is going to be alot faster.
>
> Not sure about how it handles large documents though. It essentially
> builds it into an array like $root->cds->cd[1]->artist->value;

Daniel, thank you for the answer!

SimpleXML is a DOM parser and is not really suitable... Building the whole
XML tree in memory (as SimpleXML does things) is not very efficient and
should only be used when you know the XML files will be small.
Unfortunately, I can't make that assumption.

I have already implemented the script by using XMLReader and it looks very
fast, but then again, I haven't tried doing the same thing with SAX so I
can't really tell which method would be faster.

Anyway, thank you & enjoy coding!

Anze

[Back to original 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

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