News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Stamatiou's Blog:
How To Parse XML with PHP5
April 19, 2007 @ 15:39:00

On his blog today, Paul has posted this quick guide to working with XML in PHP5, specifically how to parse it and use the data however you'd like.

One of the most common things web coders run into is the need to parse some type of XML file. Many web services return API calls in XML format, so it's just handy to know how to parse these results quickly. With PHP4 you usually have to rely on some large parsing library to get the job done or deal with overly complicated PHP functions, but PHP 5 has a great extension called SimpleXML.

He goes on to give an example, the geocoding service that Yahoo! offers, and two examples of how to parse the response with SimpleXML. He also includes a little bit of extra code to help with some of the more "intricate" XML you might come across.

0 comments voice your opinion now!
php5 parse xml simplexml php5 parse xml simplexml


blog comments powered by Disqus

Similar Posts

DevShed: A Quick Overview of the XML DOM Extension in PHP 5

Tony Bibbs' Blog: PHP5 SOAP Still Has Ways to Go

PHPBuilder.com: Using XML, Part 5 - SOAP and WSDL

Paul Jones\' Blog: Solar 0.19.0 released

Internet Super Hero Blog: PDO_MYSQLND: The new features of PDO_MYSQL in PHP 5.3


Community Events





Don't see your event here?
Let us know!


conference install configure composer symfony api extension laravel list series release community unittest version language introduction voicesoftheelephpant interview podcast opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework