2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 06:55:13 +00:00
|
|
|
<!-- $Revision$ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.domdocument-get-element-by-id" xmlns="http://docbook.org/ns/docbook">
|
2002-04-15 00:12:54 +00:00
|
|
|
<refnamediv>
|
2012-01-12 05:58:52 +00:00
|
|
|
<refname>DomDocument::get_element_by_id</refname>
|
2002-04-15 00:12:54 +00:00
|
|
|
<refpurpose>
|
2002-04-22 12:05:41 +00:00
|
|
|
Searches for an element with a certain id
|
2002-04-15 00:12:54 +00:00
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
2004-11-01 16:40:58 +00:00
|
|
|
&reftitle.description;
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodsynopsis>
|
2012-01-12 05:58:52 +00:00
|
|
|
<type>domelement</type><methodname>DomDocument::get_element_by_id</methodname>
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodparam><type>string</type><parameter>id</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2002-04-22 12:05:41 +00:00
|
|
|
This function is similar to
|
2003-01-18 23:03:19 +00:00
|
|
|
<function>domdocument_get_elements_by_tagname</function> but searches for
|
2002-04-22 12:05:41 +00:00
|
|
|
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
|
2012-04-03 08:12:03 +00:00
|
|
|
implementation simply does an xpath search for <literal>"//*[@ID = '%s']"</literal>. This
|
2002-04-22 12:05:41 +00:00
|
|
|
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.
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2003-01-18 23:03:19 +00:00
|
|
|
See also <function>domdocument_get_elements_by_tagname</function>
|
2002-04-15 00:12:54 +00:00
|
|
|
</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
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
|
|
|
|
-->
|