mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 05:48:57 +00:00

- All id attributes are now xml:id - Add docbook namespace to all root elements - Replace <ulink /> with <link xlink:href /> - Minor markup fixes here and there git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
73 lines
1.7 KiB
XML
73 lines
1.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.11 $ -->
|
|
<refentry xml:id='function.domnode-next-sibling' xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>DomNode->next_sibling</refname>
|
|
<refpurpose>
|
|
Returns the next sibling of node
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>domelement</type><methodname>DomNode->next_sibling</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
This function returns the next sibling of the current node. If there is
|
|
no next sibling it returns &false; (< 4.3) or null (>= 4.3). You can
|
|
use this function to iterate over all children of a node as shown in the
|
|
example.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Iterate over children</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
include("example.inc");
|
|
|
|
if (!$dom = domxml_open_mem($xmlstr)) {
|
|
echo "Error while parsing the document\n";
|
|
exit;
|
|
}
|
|
|
|
$elements = $dom->get_elements_by_tagname("tbody");
|
|
$element = $elements[0];
|
|
$child = $element->first_child();
|
|
|
|
while ($child) {
|
|
print_r($child);
|
|
$child = $child->next_sibling();
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
See also <function>domnode_previous_sibling</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
|
|
-->
|