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
- How to Create an Image in PHP
- How to Prevent Email Injection in Your PHP Form to Mail Scripts
- Writing Your First PHP Script: Feedback Form Script
- Creating a Simple PHP Cache Script
- How to write a simple scraper in PHP without Regex
- PHP cURL functions tutorial
- Submitting forms using PHP cURL
- Two way encryption
- How to Add Data in a MySQL table
- PHP Nested Loop Tutorial
- 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



