PHP Classes

XML: Parse XML documents into arrays and vice-versa

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,446 All time: 2,707 This week: 660Up
Version License PHP version Categories
array2xml_xml2array 1.0GNU General Publi...5.1XML, PHP 5, Data types
Description 

Author

This class can be used to parse XML documents and build an array with the document structure.

It can also generate XML documents from nested arrays that define the document tag structure.

The class can load XML documents from files or text strings. It turns the document tags into keys of a nested associative array. The resulting array is stored in a class variable.

It can also take an array with the document structure and generate a XML document. The document XML is returned as a string.

Picture of Ricardo Alexandre Sismeiro
Name: Ricardo Alexandre ... <contact>
Classes: 2 packages by
Country: Portugal Portugal

  Files folder image Files (4)  
File Role Description
Accessible without login Plain text file example.xml Output xml source
Accessible without login Plain text file example_array2xml.php Example example
Accessible without login Plain text file example_xml2array.php Example example
Plain text file xml.php Class class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,446
This week:0
All time:2,707
This week:660Up