Predefined Constants
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
Constant | Value | Description |
---|---|---|
XML_ELEMENT_NODE
(integer)
|
1 | Node is a DOMElement |
XML_ATTRIBUTE_NODE
(integer)
|
2 | Node is a DOMAttr |
XML_TEXT_NODE
(integer)
|
3 | Node is a DOMText |
XML_CDATA_SECTION_NODE
(integer)
|
4 | Node is a DOMCharacterData |
XML_ENTITY_REF_NODE
(integer)
|
5 | Node is a DOMEntityReference |
XML_ENTITY_NODE
(integer)
|
6 | Node is a DOMEntity |
XML_PI_NODE
(integer)
|
7 | Node is a DOMProcessingInstruction |
XML_COMMENT_NODE
(integer)
|
8 | Node is a DOMComment |
XML_DOCUMENT_NODE
(integer)
|
9 | Node is a DOMDocument |
XML_DOCUMENT_TYPE_NODE
(integer)
|
10 | Node is a DOMDocumentType |
XML_DOCUMENT_FRAG_NODE
(integer)
|
11 | Node is a DOMDocumentFragment |
XML_NOTATION_NODE
(integer)
|
12 | Node is a DOMNotation |
XML_HTML_DOCUMENT_NODE
(integer)
|
13 | |
XML_DTD_NODE
(integer)
|
14 | |
XML_ELEMENT_DECL_NODE
(integer)
|
15 | |
XML_ATTRIBUTE_DECL_NODE
(integer)
|
16 | |
XML_ENTITY_DECL_NODE
(integer)
|
17 | |
XML_NAMESPACE_DECL_NODE
(integer)
|
18 | |
XML_ATTRIBUTE_CDATA
(integer)
|
1 | |
XML_ATTRIBUTE_ID
(integer)
|
2 | |
XML_ATTRIBUTE_IDREF
(integer)
|
3 | |
XML_ATTRIBUTE_IDREFS
(integer)
|
4 | |
XML_ATTRIBUTE_ENTITY
(integer)
|
5 | |
XML_ATTRIBUTE_NMTOKEN
(integer)
|
7 | |
XML_ATTRIBUTE_NMTOKENS
(integer)
|
8 | |
XML_ATTRIBUTE_ENUMERATION
(integer)
|
9 | |
XML_ATTRIBUTE_NOTATION
(integer)
|
10 |
Constant | Value | Description |
---|---|---|
DOM_PHP_ERR
(integer)
|
0 | Error code not part of the DOM specification. Meant for PHP errors. |
DOM_INDEX_SIZE_ERR
(integer)
|
1 | If index or size is negative, or greater than the allowed value. |
DOMSTRING_SIZE_ERR
(integer)
|
2 | If the specified range of text does not fit into a DOMString. |
DOM_HIERARCHY_REQUEST_ERR
(integer)
|
3 | If any node is inserted somewhere it doesn't belong |
DOM_WRONG_DOCUMENT_ERR
(integer)
|
4 | If a node is used in a different document than the one that created it. |
DOM_INVALID_CHARACTER_ERR
(integer)
|
5 | If an invalid or illegal character is specified, such as in a name. |
DOM_NO_DATA_ALLOWED_ERR
(integer)
|
6 | If data is specified for a node which does not support data. |
DOM_NO_MODIFICATION_ALLOWED_ERR
(integer)
|
7 | If an attempt is made to modify an object where modifications are not allowed. |
DOM_NOT_FOUND_ERR
(integer)
|
8 | If an attempt is made to reference a node in a context where it does not exist. |
DOM_NOT_SUPPORTED_ERR
(integer)
|
9 | If the implementation does not support the requested type of object or operation. |
DOM_INUSE_ATTRIBUTE_ERR
(integer)
|
10 | If an attempt is made to add an attribute that is already in use elsewhere. |
DOM_INVALID_STATE_ERR
(integer)
|
11 | If an attempt is made to use an object that is not, or is no longer, usable. |
DOM_SYNTAX_ERR
(integer)
|
12 | If an invalid or illegal string is specified. |
DOM_INVALID_MODIFICATION_ERR
(integer)
|
13 | If an attempt is made to modify the type of the underlying object. |
DOM_NAMESPACE_ERR
(integer)
|
14 | If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces. |
DOM_INVALID_ACCESS_ERR
(integer)
|
15 | If a parameter or an operation is not supported by the underlying object. |
DOM_VALIDATION_ERR
(integer)
|
16 | If a call to a method such as insertBefore or removeChild would make the Node invalid with respect to "partial validity", this exception would be raised and the operation would not be done. |
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-dom.constants.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.