|
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]
|