PHP Classes

Object To XML: Generate XML from values of object variables

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


This class can be used to generate XML documents from values of object variables.

It traverses the public variables of a given object and generates a XML document with the variable names as tags and the variable values as tag values.

Object and array values are converted into nested tag values.

The root tag of the generated document is the class name.

The resulting XML document can be returned as a string.

Picture of Jason Houle
Name: Jason Houle <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 2123297 in United States United States
Week rank: 503 Up50 in United States United States Up

  Files folder image Files  
File Role Description
Plain text file ObjectToXML.php Class Convert PHP objects to XML

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,163
This week:423Up