Forum Moderators: coopster

Message Too Old, No Replies

Fastest PHP XML parser?

         

irock

8:08 am on Jan 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I want to know where to find the world's fastest PHP XML parser code. I really need it as my page is generated from multiple source of XML feed.

Thanks much!

dmorison

11:02 am on Jan 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If (and only if!) you just want the CDATA component of a single element; and you know that the element shall only occur once in your feed; then don't bother with a parser and just use a regexp on your string $xml...


ereg("<element>(.*)</element>",$xml,$regs);

$cdata = $regs[1];

...just replace element with the actual element name that you wish to extract.