PHP Classes

XML 2 Array: Parse an XML document into an array XPATH indexed

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
StarStarStar 57%Total: 10,429 All time: 124 This week: 660Down
Version License Categories
xml2array 1.0.0GNU General Publi...XML, PHP 5, Data types
Description 

Author

This is a simple class can parse a XML document file and build an associative array from its elements.

The resulting array has as indices the XPATH location of the document data elements.

Picture of Michal Palma
Name: Michal Palma <contact>
Classes: 4 packages by
Country: Czech Republic Czech Republic
Age: 43
All time rank: 791 in Czech Republic Czech Republic
Week rank: 178 Down1 in Czech Republic Czech Republic Equal

Details

/* * Class to read XML file * Class use SimpleXml - default PHP lib * @package Xml2Array * @date 2005-07-29 */ This is very primitive class to read XML files. It does not know to write XML data. In construction of object You must specify complete filename with address. Then You will use function __get() and in the parameter You will write XPATH of XML element from which You want content. Throws standard PHP5 Exceptions with codes: -1 for error of opening file, 1 for error of reading XPATH from file Thats all. Some cases of use are defined in ___case_of_use.php.

  Files folder image Files (4)  
File Role Description
Accessible without login Plain text file readmeFirst.txt Doc. description
Plain text file test.xml Data Auxiliary test data
Plain text file Xml2Array.class.php Class Xml2Array class
Accessible without login Plain text file ___case_of_use.php Example Cases of use

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 Reuses Unique User Downloads Download Rankings  
 0%1
Total:10,429
This week:0
All time:124
This week:660Down
User Ratings User Comments (1)
 All time
Utility:70%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:68%StarStarStarStar
Examples:78%StarStarStarStar
Tests:-
Videos:-
Overall:57%StarStarStar
Rank:1687