Parsing XML/RSS feeds easily with SimpleXML
| Published on 3/9/2008 by Dotnetindex More articles in PHP
|
In this tutorial, we will try to parse an RSS feed using SimpleXML . SimpleXML is a new focus provided in PHP5. It's a very useful object. This powerful object converts XML data to object. SimpleXML is enabled by default. First example: $xml = new SimpleXMLElement('http://www.dotnetindex.com/rss.asp' ,null, true);
Only two lines of code is enough to display any data from XML source. That looks awesome! Ok. let's play more at codes. Now we will parse all rss feed of Dotnetindex.com. Second example: $xml = new SimpleXMLElement('http://www.dotnetindex.com/rss.asp' ,null, true);Easily done. All data processed with normal property selectors and array iterators. Only we have looped them and placed a little bit of HTML codes. Happy Coding |
no comments submitted
Latest Posts
- Image manipulation and watermarking in PHP with GD2
- Making A Cool Login System With PHP, MySQL & jQuery
- Build a customizable RSS feed aggregator in PHP
- Custom RSS 2.0 Content Feeds using OOP
- PHP Development: Getting Started
- How to Count all elements in an array
- Making A Cool Login System With PHP, MySQL & jQuery
- Screen capture with PHP and GD
- Database driven web counter with PHP/mySQL



