Index  |  Quick Docs  |  Usage Examples

phpdomxml-0.9.0 Quick Docs

This project is my tiny contribution to the open source community. phpdomxml is an OOP implementation of the XML DOM for PHP. It tries not to be a 100% complete implementation of the nifty w3c standards. In fact, its aim is to be a light-weight implementation for 'every-day' usage of XML-documents in a PHP 4.10+ environment. phpdomxml does not rely on any external libraries, it does however require the expat XML parser functions for PHP, which should be included by default.

The methods and properties follow the design as layed out by the World Wide Web Consorticum and as was implemented in ECMAScript or compatible languages like Javascript and Actionscript. phpdomxml does not support validating by DTD through the document type definition. The document type is recorded when reading an XML document, but not used.


This project started out as a necassity for an OOP implementation of the XML DOM for PHP. A few months ago PHP 5.0 was released and, though I didn't find the time to look under the hood, it seems to have a very solid implementation of the DOM. Since it will take some time for hosting providers to make the switch from PHP 4.x to PHP 5.0, it seemed like a good idea to release this work to the open source community.

There are some beautiful implementations of the XML DOM for PHP out there. I, however, took the liberty of making some shortcuts by treating some of the objects as simple (associative) PHP arrays. For instance, the Attr and NamedNodeMap interfaces are dropped and the attributes of an element can be addressed by using the attributes array of an XML_Node interface, or by using the DOM-compliant XML_Element::getAttribute().

The following interfaces are not implemented in phpdomxml: Attr, DocumentFragment, DocumentType, DOMImplementation, Entity, EntityReference, NamedNodeMap, NodeList, Notation and ProcessingInstruction.


The list below specifies interfaces and their methods and properties. Elements denoted in red are w3c standards that are implemented in phpdomxml-0.9.0. Elements denoted in green are extensions to the standard.


Licensed under the GNU General Public License (GPL).

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.