browser lang:en
After have verified how it's possible traversing XML with PHP and retrieve relative datas using DOM classes, here we show a new solution that, in the real world, results to be ten times faster than the DOM solution.
Infact using the new SimpleXML classes, the XML traversing process increases fastness of data elaboration and the syntax of code it's more easy to understand; try to believe!! (compare with previous function)
/*
<hotels>
<hotel>
<hotelId>1494598</hotelId>
<hotelName>Melia</hotelName>
<cityName>Saint Charles</cityName>
</hotel>
</hotels>
*/
$hotels = new SimpleXMLElement('hotels.xml',null,true);
foreach($hotels as $hotel) {
echo $hotel->hotelName.'<br>';
echo $hotel->cityName.'<br>';
}
Selective Tweets is an application that allows you to control what tweets are added to your Facebook…
in:Social Networking (0 comments)In a FBML Facebook App, your quick jump menu will require a little tweak to work in FBJS…
in:Scripts and tutorials (0 comments)Every single day, someone, somewhere is discussing something important to your business; your brand, your executives, your…
in:Scripts and tutorials (0 comments)Although some IT managers are coming around to the idea of supporting iPhones, most aren’t convinced…
in:Free Software (0 comments)When you want to run your own mail server, and it does not matter what version and…
in:Apache - .htaccess (0 comments)Have you ever had to develop something yourself only to find out that there had already been…
in:JQuery (0 comments)The situation begins with your blog or website and you need to post some code on a particular…
in:The Holy Faq's (0 comments)So. Google just recently announced Google Buzz. I’m not sure about you, but I…
in:Blog (0 comments)
