<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
<!-- 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>
    &reftitle.description;
    <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
-->