DOM XML functionsDOM XML
These functions are only available if PHP was configured with
, 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 PHP4.
This module defines the following constants:
XML constantsConstantValueDescriptionXML_ELEMENT_NODE1XML_ATTRIBUTE_NODE2XML_TEXT_NODE3XML_CDATA_SECTION_NODE4XML_ENTITY_REF_NODE5XML_ENTITY_NODE6XML_PI_NODE7XML_COMMENT_NODE8XML_DOCUMENT_NODE9XML_DOCUMENT_TYPE_NODE10XML_DOCUMENT_FRAG_NODE11XML_NOTATION_NODE12XML_GLOBAL_NAMESPACE1XML_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.
xmldocCreates a DOM object of an XML documentDescriptionobject xmldocstring str
The function parses the XML document in
str and returns an object of class "Dom
document", having the properties "doc" (resource), "version"
(string) and "type" (long).
xmldocfileCreates a DOM object from XML fileDescriptionobject xmldocfilestring filename
The function parses the XML document in the file named
filename and returns an object of class
"Dom document", having the properties "doc" (resource), "version"
(string).
xmltree
Creates a tree of php objects from XML document
Descriptionobject xmltreestring str
The function parses the XML document in
str and returns a tree PHP objects as the
parsed document.