updated to the last source commits

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@92254 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christian Stocker 2002-08-16 09:10:15 +00:00
parent e2996f86f9
commit 3afcc1f8e3
4 changed files with 29 additions and 11 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.40 -->
<refentry id='function.DomNode-append-child'>
<refnamediv>
@ -22,7 +22,7 @@
other node.
</para>
<para>
Before a new child is appended it is first duplicated. Therefore the new
(PHP &lt; 4.3) Before a new child is appended it is first duplicated. Therefore the new
child is a completely new copy which can be modified without changing the
node which was passed to this function. If the node passed has children
itself, they will be duplicated as well, which makes it quite easy to
@ -30,6 +30,13 @@
appended child. If you plan to do further modifications on the appended
child you must use the returned node.
</para>
<para>
(PHP &gt;= 4.3) The new child <parameter>newnode</parameter> is first
unlinked from its existing context, if it already existed in a document.
Therefore the node is moved and not copies anymore. This is the behaviour
according to the W3C specifications. If you want to duplicate large parts
of a xml document, use DomNode->clone_node() before appending.
</para>
<para>
The following example will add a new element node to a fresh document
and sets the attribute "align" to "left".
@ -98,7 +105,8 @@ echo "</PRE>";
<function>DomNode_append_child</function>.
</para>
<para>
See also <function>DomNode_insert_before</function>.
See also <function>DomNode_insert_before</function>,
<function>DomNode_clone_node</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 -->
<refentry id='function.DomNode-insert-before'>
<refnamediv>
@ -17,10 +17,16 @@
</methodsynopsis>
<para>
This function inserts the new node <parameter>newnode</parameter> right
before the node <parameter>refnode</parameter>. The return value is the
inserted node. If you plan to do further modifications on the appended
before the node <parameter>refnode</parameter>. The return value is the
inserted node. If you plan to do further modifications on the appended
child you must use the returned node.
</para>
<para>
(PHP &gt;= 4.3 only) If <parameter>newnode</parameter> already is part of a
document, it will be first unlinked from its existing context. If
<parameter>refnode</parameter> is NULL, then <parameter>newnode</parameter>
will be inserted at the end of the list of children.
</para>
<para>
<function>DomNode_insert_before</function> is very similar to
<function>DomNode_append_child</function> as the following example shows

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 -->
<refentry id='function.DomNode-next-sibling'>
<refnamediv>
@ -16,8 +16,9 @@
</methodsynopsis>
<para>
This function returns the next sibling of the current node. If there is
no next sibling it returns false. You can use this function to iterate
over all children of a node as shown in the example.
no next sibling it returns false (&lt; 4.3) or null (&gt= 4.3). You can
use this function to iterate over all children of a node as shown in the
example.
</para>
<para>
<example>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 -->
<refentry id='function.DomNode-previous-sibling'>
<refnamediv>
@ -15,7 +15,10 @@
<void/>
</methodsynopsis>
<para>
This function returns the previous sibling of the current node.
This function returns the previous sibling of the current node. If there
is no previous sibling it returns false (&lt; 4.3) or null (&gt= 4.3). You
can use this function to iterate over all children of a node as shown in
the example.
</para>
<para>
See also <function>DomNode_next_sibling</function>.