Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of yinsee  >  XMLTree  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample script
Class: XMLTree
Parse and cache XML documents
Author: By
Last change:
Date: 2007-12-25 00:22
Size: 331 bytes
 

Contents

Class file image Download
<?
/* grab the most-interesting Flickr */
$db = new XMLTree("http://feeds.feedburner.com/InterestingFlickrNoFlowers?format=xml");

/* show the first item's title */

// the ugly way
print_r($db->xml_array['root']['rss']['channel']['item'][0]['title']);

// the OO way
print_r($db->root->rss->channel->item[0]->title);
?>