PHP Classes

XML: Parse XML documents into arrays and vice-versa

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


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
Age: 43
All time rank: 149718 in Portugal Portugal
Week rank: 311 Up4 in Portugal Portugal Up

  Files folder image Files  
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

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,706
This week:660Up