PHP Classes

Hierachical Data Object: Store and retrieve hierarchical data in XML

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 69%Total: 1,549 All time: 2,539 This week: 174Up
Version License Categories
hdobj 1.0BSD LicenseXML, Data types


This class can be used to create and manipulate hierachical objects that can be stored and retrieved from XML documents.

The class provides means to define an object and their property values, as well to add children object and so dynamically build an hierarchy of objects.

The class can generate XML documents that represent the hierarchy defined by an object and its children objects.

The class constructor allows passing XML data from which it is read the definition of its properties and eventual children objects.

Innovation Award
PHP Programming Innovation award nominee
September 2005
Number 5

Prize: One downloadable copy of Roadsend PHP Compiler
XML documents can be seen as an hierarchic data structure defined by a set of nested tags and data.

This class implements an abstraction that allows creating and accessing XML documents as an hierarchy of objects. The object variables are mapped to XML tag names and variable values to XML tag data. The object variables can be set or updated to change the XML document contents.

Regenerating an updated XML document is a matter of calling a function to generate XML tags starting from the root object of the hierarchy. Loading a new XML document can be done passing the XML data to the class constructor.

This object oriented approach makes it simpler to create and update XML documents of any complexity.

Manuel Lemos
Picture of Dave
Name: Dave <contact>
Classes: 6 packages by
Country: South Africa South Africa
Age: 45
All time rank: 1703 in South Africa South Africa
Week rank: 346 Down2 in South Africa South Africa Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file append.xml Data data to use with the example script, for showing off the append_xml function
Accessible without login Plain text file data.xml Data data to use with the example script test_hdobj.php
Plain text file hdobj.php Class HDObject class file
Accessible without login HTML file hdobj_doc.html Doc. Class documentation
Plain text file log.php Class logger base class
Accessible without login Plain text file test_hdobj.php Example example usage script 13KB
Downloadhdobj-2008-03-17.tar.gz 12KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
DOMIT XML parser Download .zip .tar.gz for the xml transport process into and out of the HDObj Conditional
 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,539
This week:174Up
 User Ratings  
 All time