<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id="function.domdocument-get-element-by-id"> <refnamediv> <refname>DomDocument->get_element_by_id</refname> <refpurpose> Searches for an element with a certain id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>object</type><methodname>DomDocument->get_element_by_id</methodname> <methodparam><type>string</type><parameter>id</parameter></methodparam> </methodsynopsis> <para> This function is similar to <function>domdocument_get_elements_by_tagname</function> 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. </para> <para> See also <function>domdocument_get_elements_by_tagname</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->