DOM functions
These functions are only available if PHP was configured with --with-dom=[DIR], using the GNOME xml library. You will need at least lib-2.0.0 (the beta version will not work). These functions have been added in 4.
This module defines the following constants:
Table 1. constants
Constant Value Description
_ELEMENT_NODE 1
_ATTRIBUTE_NODE 2
_TEXT_NODE 3
_CDATA_SECTION_NODE 4
_ENTITY_REF_NODE 5
_ENTITY_NODE 6
_PI_NODE 7
_COMMENT_NODE 8
_DOCUMENT_NODE 9
_DOCUMENT_TYPE_NODE 10
_DOCUMENT_FRAG_NODE 11
_NOTATION_NODE 12
_GLOBAL_NAMESPACE 1
_LOCAL_NAMESPACE 2
This module defines a number of classes. The DOM XML functions return a parsed tree of the document with each node being an object belonging to one of these classes.
doc
(4 >= 4.0b4)
xmldoc -- Creates a DOM object of an document
Description
object doc (string str)
The function parses the document in str and returns an object of class "Dom document", having the properties "doc" (resource), "version" (string) and "type" (long).
docfile
(4 >= 4.0b4)
xmldocfile -- Creates a DOM object from file
Description
object docfile (string filename)
The function parses the document in the file named filename and returns an object of class "Dom document", having the properties "doc" (resource), "version" (string).
tree
(4 >= 4.0b4)
tree -- Creates a tree of objects from document
Description
object tree (string str)
The function parses the document in str and returns a tree objects as the parsed document.