From 9992ae65b32b3fc4bb53fcab537d14caf7f20c4f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Apr 2002 12:05:41 +0000 Subject: [PATCH] - initial documentation and note about different behaviour in contrast to DOM git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@79414 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/DomDocument-get-element-by-id.xml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/reference/domxml/functions/DomDocument-get-element-by-id.xml b/reference/domxml/functions/DomDocument-get-element-by-id.xml index 5301f34050..4e2beddac0 100644 --- a/reference/domxml/functions/DomDocument-get-element-by-id.xml +++ b/reference/domxml/functions/DomDocument-get-element-by-id.xml @@ -1,10 +1,11 @@ - + DomDocument->get_element_by_id + Searches for an element with a certain id @@ -14,9 +15,17 @@ stringid + This function is similar to + DomDocument_get_elements_by_tagname but searches for + an element with a given id. According to the DOM standard this requires a + DTD which defines the attribute ID to be of type ID, though the current + implementation simply does an xpath search for "//*[@ID = '%s']". This + does not comply to the DOM standard which requires to return null if it + is not known which attribute is of type id. This behaviour is likely to + be fixed, so do not rely on the current behaviour. - See also DomDocument_add_root + See also DomDocument_get_elements_by_tagname