File Name :- example.php channel as $pChild) { // Print our channel specific information, this should be // easy to understand, basically we're grabbing the // title, descripting and link nodes and outputting their values echo "
" . $pChild->title . "
\n"; echo "
\n"; echo $pChild->description . "
\n"; echo sprintf('Visit us at %s
' . "\n", $pChild->link, $pChild->link); echo "
\n";
// Now we want to loop through the items inside this channel
foreach ($pFile->channel->item as $pItem) { echo "
\n";
// If this item has child nodes as it should, // loop through them and print out the data foreach ($pItem->children() as $pChild) { // We can check the name of this node using the getName() method. // We can then use this information, to, for example, embolden // the title or format a link switch ($pChild->getName()) { case 'title': echo "$pChild
\n"; break;
case 'link': printf('\n"; break; }
}
echo "
\n"; } }
?>
Now Xml File :- talkphp.xml
TalkPHP http://www.talkphp.com Discuss PHP and other various web related topics in a knowledgeable and friendly community. en http://www.talkphp.com/images/misc/rss.jpg TalkPHP http://www.talkphp.com - http://www.talkphp.com/showthread.php?t=1107&goto=newpost Forum: Member Introductions Posted By: Shaun Post Time: 09-14-2007 at 01:15 PM
- AJAX File Uploader http://www.talkphp.com/showthread.php?t=1106&goto=newpost
Forum: Javascript, AJAX, E4X Posted By: CreativeLogic Post Time: 09-13-2007 at 07:32 PM
- Some sites of mine... http://www.talkphp.com/showthread.php?t=1104&goto=newpost Forum: Show Off Posted By: Craddock Post Time: 09-13-2007 at 04:54 PM
- The Dangers of the Header Function http://www.talkphp.com/showthread.php?t=1102&goto=newpost Forum: Absolute Beginners Posted By: Wildhoney Post Time: 09-13-2007 at 02:32 PM
- Help Net Security: Remote Vulnerabilities Discovered in phpMyAdmin http://www.talkphp.com/showthread.php?t=1101&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 09:17 PM
- http://www.talkphp.com/showthread.php?t=1099&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 08:21 PM
- PradoSoft.com: PRADO/Wordpress/BBPress integration v1.0... http://www.talkphp.com/showthread.php?t=1100&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 08:21 PM
- ProadSoft.com: PRADO/Wordpress/BBPress integration v1.0... http://www.talkphp.com/showthread.php?t=1098&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 06:13 PM
- DevShed: Understanding Static Properties with PHP 5 http://www.talkphp.com/showthread.php?t=1097&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 05:17 PM
- http://www.talkphp.com/showthread.php?t=1096&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 04:12 PM
- WebReference.com: Class Inheritance with PHP http://www.talkphp.com/showthread.php?t=1095&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 03:22 PM
- Bullets not rendering http://www.talkphp.com/showthread.php?t=1094&goto=newpost Forum: XHTML, HTML, CSS Posted By: Haris Post Time: 09-12-2007 at 03:08 PM
- Community News: Latest PHPClasses.org Releases for 09.12.2007 http://www.talkphp.com/showthread.php?t=1092&goto=newpost
Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 02:11 PM
- http://www.talkphp.com/showthread.php?t=1090&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 02:11 PM
- http://www.talkphp.com/showthread.php?t=1091&goto=newpost Forum: PHP Freaks Posted By: mike.fro Post Time: 09-12-2007 at 02:11 PM