SimpleXML for PHP4

Do you like and use SimpleXML? it is nice library for development common tasks, but have one BIG limitation - SimpleXML extension requires PHP 5. And what you will do if client have PHP4? it will be big success if client can upgrade php to version 5, but if not? There are a lot php custom solution which require PHP4 and clients don't want to spent money for upgrades or just prefer to to leave it as it, because it work.

Don't worry there are solution! you can use SimpleXML class

For example to view structured PHP rss feed from kalexandr.com you can do something like this:

<?php
$file = "http://www.kalexandr.com/taxonomy/term/4/0/feed";
$sxml = new simplexml;
$data = $sxml->xml_load_file($file);
print_r($data); 
?>

Trackback URL for this post:

https://www.kalexandr.com/trackback/65
Tags:
Links: