PHP Classes
elePHPant
Icontem

XML Helper: Extract XML data into an array and vice-versa

Recommend this page to a friend!
  Info   View files Documentation   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2011-01-04 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 336 All time: 6,717 This week: 884Up
Version License PHP version Categories
xml-helper 11.1.2MIT/X Consortium ...5.3XML, PHP 5
Description Author

This class can be used to extract XML data into an array and vice-versa.

It can parse a given XML document and return a nested array that describes the XML document structure and data.

The class can also do the opposite, i.e. take an array with a document structure and data and generate a XML document from it.

A full PHPUnit test suite is included. You'll need to have PHPUnit installed to use it.

Recommendations

convert array to xml
I need to convert array to XML

Picture of Richard Williams
  Performance   Level  
Name: Richard Williams <contact>
Classes: 2 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Files folder imagedoc (1 file)
Files folder imagetests (2 files, 1 directory)
Accessible without login Plain text file XmlHelper.class.php Class Class

  Files folder image Files  /  doc  
File Role Description
  Accessible without login Plain text file XmlHelper.txt Doc. Description of the class

  Files folder image Files  /  tests  
File Role Description
Files folder imagetestXmlData (10 files)
  Accessible without login Plain text file stand-alone-test.php Example non-phpunit example/test
  Accessible without login Plain text file XmlHelperTest.php Test Unit Tests

  Files folder image Files  /  tests  /  testXmlData  
File Role Description
  Accessible without login Plain text file 55521_cwr.xml Data Test data
  Accessible without login Plain text file 55521_item_only.xml Data Test data
  Accessible without login Plain text file 55521_total_only.xml Data Test data
  Accessible without login Plain text file base_test.xml Data Test data
  Accessible without login Plain text file endicia-status.xml Data Test data
  Accessible without login Plain text file ibm.xml Data Test data
  Accessible without login Plain text file large_array.php Aux. Test data
  Accessible without login Plain text file one_element.php Data Test data
  Accessible without login Plain text file purchase-order-sample.xml Data Test data
  Accessible without login Plain text file xmlbase.xml Data Test data

 Version Control Unique User Downloads Download Rankings  
 0%
Total:336
This week:0
All time:6,717
This week:884Up