/php-XML-Simple

Library to parse XML into a valid hash data structure

Primary LanguagePHPGNU General Public License v2.0GPL-2.0

PHP XML Simple

Build Status

Namespaced libary to parse XML into a hash data structure. Other implementations also do this, but ignore attributes. This library handles attributes correctly.

This library is based on the Perl library: XML::Simple. Much care was taken to make the output of this PHP library mimic XML::Simple.

Requires: PHP 5.3 (for namespace support) and SimpleXML support in your PHP.

Usage:

require("/path/to/XML-Simple.php");

$hash = \scottchiefbaker\xml::XMLin($filename);
$hash = \scottchiefbaker\xml::XMLin($xml_string);