php-doc-en/reference/domxml/functions/DomNode-replace-node.xml
Damien Seguy 06242e8add id should be lowercase
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@156911 c90b9560-bf6c-de11-be94-00142212c4b1
2004-04-23 12:14:15 +00:00

59 lines
2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.39 -->
<refentry id='function.domnode-replace-node'>
<refnamediv>
<refname>DomNode->replace_node</refname>
<refpurpose>
Replaces node
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>object</type><methodname>DomNode->replace_node</methodname>
<methodparam><type>object</type><parameter>newnode</parameter></methodparam>
</methodsynopsis>
<para>
(PHP 4.2) This function replaces an existing node with the passed
new node. Before the replacement
<parameter>newnode</parameter> is copied if it has a parent to
make sure a node which is
already in the document will not be inserted a second time. This
behaviour enforces doing all modifications on the node before the
replacement or to refetch the inserted node afterwards with functions like
<function>domnode_first_child</function>,
<function>domnode_child_nodes</function> etc..
</para>
<para>
(PHP 4.3) This function replaces an existing node with the passed new node. It is not
copied anymore. If <parameter>newnode</parameter> was already inserted in the document
it is first unlinked from its existing context. If the replacement succeeds the old
node is returned.
</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
-->