php-doc-en/reference/domxml/functions/DomNode-replace-child.xml
Damien Seguy fb4d2b592e using &true; entity
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@112582 c90b9560-bf6c-de11-be94-00142212c4b1
2003-01-18 23:03:19 +00:00

57 lines
1.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id='function.DomNode-replace-child'>
<refnamediv>
<refname>DomNode->replace_child</refname>
<refpurpose>
Replaces a child
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>object</type><methodname>DomNode->replace_child</methodname>
<methodparam><type>object</type><parameter>oldnode</parameter></methodparam>
<methodparam><type>object</type><parameter>newnode</parameter></methodparam>
</methodsynopsis>
<para>
(PHP 4.2) This function replaces the child <parameter>oldnode</parameter>
with the passed new node. If the new node is already a child it
will not be added a second time. If the old node cannot be found
the function returns &false;. If the replacement succeds the old node
is returned.
</para>
<para>
(PHP 4.3) This function replaces the child <parameter>oldnode</parameter>
with the passed <parameter>newnode</parameter>, even if the new node already
is a child of the DomNode. If <parameter>newnode</parameter> was already
inserted in the document it is first unlinked from its existing context.
If the old node cannot be found the function returns &false;. If the replacement
succeds the old node is returned. (This behaviour is according to the W3C specs).
</para>
<para>
See also <function>domnode_append_child</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
-->