News Feed
Sections




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

MSBWare.com:
XML to Array
April 14, 2008 @ 10:23:11

Michael has posted a simple script today that takes in XML data and spits back out an array on the other side:

The function takes the specified XML data (which must be in valid XML format) and converts into an array. Any attributes in the XML elements are dropped an only the element values are placed in the array.

The code uses a combination of XPath, DOM, and regular expressions to parse the given XML content.

0 comments voice your opinion now!
xml translate array xpath dom regularexpression data element


blog comments powered by Disqus

Similar Posts

Paul Stamatiou's Blog: How To: Parse XML with PHP5

Christoph Dorn's Blog: TIP: FirePHP data volume filtering

Till Klampaeckel's Blog: Zend Framework: Writing an IN-Clause with Zend_Db

PHPBuilder.com: The ABC's of PHP - Part 10 - The Final Installment (XML & Regex)

Nikic's Blog: How big are PHP arrays (and values) really? (Hint: BIG!)


Community Events





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


configure testing developer language introduction install symfony2 list unittest laravel framework refactor threedevsandamaybe series opinion community release interview podcast code

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