XVII. DOM XML functions

These functions are only available if PHP was configured with --with-dom=[DIR], using the GNOME xml library. You will need at least libxml-2.0.0 (the beta version will not work). These functions have been added in PHP 4.

This module defines the following constants:

Table 1. XML constants

ConstantValueDescription
XML_ELEMENT_NODE1 
XML_ATTRIBUTE_NODE2 
XML_TEXT_NODE3 
XML_CDATA_SECTION_NODE4 
XML_ENTITY_REF_NODE5 
XML_ENTITY_NODE6 
XML_PI_NODE7 
XML_COMMENT_NODE8 
XML_DOCUMENT_NODE9 
XML_DOCUMENT_TYPE_NODE10 
XML_DOCUMENT_FRAG_NODE11 
XML_NOTATION_NODE12 
XML_GLOBAL_NAMESPACE1 
XML_LOCAL_NAMESPACE2 

This module defines a number of classes. The DOM XML functions return a parsed tree of the XML document with each node being an object belonging to one of these classes.

Table of Contents
xmldoc — Creates a DOM object of an XML document
xmldocfile — Creates a DOM object from XML file
xmltree — Creates a tree of php objects from XML document