Location: PHPKode > scripts > Xml2Array > readme.txt
CXml2Array version 1.1

The class is meant to parse an XML file and load it into an array.
The module uses the DOMXML functions to parse the tag's values, the tag's attribute,
the external entity and CDATA section.

Also the class provides some functions to retrieve all or part of the array made from the XML file.

PHP => 4.3.0 - I've test the class using PHP 4.3.0 and PHP 4.3.1.
               I think the class should work with PHP 4.2.x.
The DOMXML extension enabled (see PHP manual how to enable it)

// Here the code to run the class
require 'CXml2Array.php';
if(!$TplDom = domxml_open_file(realpath($InName)))
   trigger_error('Error parsing the file ',E_USER_ERROR);

$root = $TplDom->document_element();
$x=new CXml2Array($root);

// if you want see the array contents, use

See test1.php to get more complete information about the usage
visit my site http://www.andrioli.com/en/php.html

1.1 - 27/2/2004 
   * Changed, now the child's tag are retrieved in the same order they are in the
     XML file
   * Changed, the text inside the tag are 'right-trimmed' in order to maintain
     the left spaces
   * New, new functions: GetText, GetTagName, EachChild, EachChildArray

1.0 - 15/12/2003 
   * First public release

That's all. I hope it be useful.
(darvin at andrioli dot com)
Return current item: Xml2Array