2002-04-23 14:25:44 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2003-01-18 23:03:19 +00:00
|
|
|
<!-- $Revision: 1.5 $ -->
|
2002-04-23 14:25:44 +00:00
|
|
|
<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>
|
2002-08-15 10:22:22 +00:00
|
|
|
(PHP 4.2) This function replaces the child <parameter>oldnode</parameter>
|
2002-04-23 14:25:44 +00:00
|
|
|
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
|
2003-01-18 23:03:19 +00:00
|
|
|
the function returns &false;. If the replacement succeds the old node
|
2002-04-23 14:25:44 +00:00
|
|
|
is returned.
|
2002-08-15 10:22:22 +00:00
|
|
|
</para>
|
2002-08-15 13:25:13 +00:00
|
|
|
<para>
|
|
|
|
(PHP 4.3) This function replaces the child <parameter>oldnode</parameter>
|
2002-08-15 10:22:22 +00:00
|
|
|
with the passed <parameter>newnode</parameter>, even if the new node already
|
2002-08-15 13:25:13 +00:00
|
|
|
is a child of the DomNode. If <parameter>newnode</parameter> was already
|
|
|
|
inserted in the document it is first unlinked from its existing context.
|
2003-01-18 23:03:19 +00:00
|
|
|
If the old node cannot be found the function returns &false;. If the replacement
|
2002-08-15 13:25:13 +00:00
|
|
|
succeds the old node is returned. (This behaviour is according to the W3C specs).
|
2002-04-23 14:25:44 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2003-01-18 23:03:19 +00:00
|
|
|
See also <function>domnode_append_child</function>
|
2002-04-24 08:27:30 +00:00
|
|
|
</para>
|
2002-04-23 14:25:44 +00:00
|
|
|
</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
|
|
|
|
-->
|