Files
doc-fr/reference/domxml/functions/DomNode-remove-child.xml
T
Yannick Torres 99ca5507ce sync with EN (docBook update)
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@240100 c90b9560-bf6c-de11-be94-00142212c4b1
2007-07-21 18:18:01 +00:00

81 lines
2.1 KiB
XML
Executable File

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- EN-Revision: 1.9 Maintainer: jsgoupil Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.domnode-remove-child" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>DomNode->remove_child</refname>
<refpurpose>
Supprime un fils de la liste des noeuds fils
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>domtext</type><methodname>DomNode->remove_child</methodname>
<methodparam><type>domtext</type><parameter>oldchild</parameter></methodparam>
</methodsynopsis>
<para>
<function>DomNode->remove_child</function> supprime le fils <parameter>oldchild</parameter>
de la liste des noeuds fils du noeud courant. Si le fils n'a pu être retiré,
ou si ce n'est pas un fils du noeud courant, <function>DomNode->remove_child</function>
retournera &false;. Si le fils a pu être retiré, <function>DomNode->remove_child</function>
le retournera.
</para>
<para>
<example>
<title>Supprimer un noeud en DOM XML</title>
<programlisting role="php">
<![CDATA[
<?php
include("exemple.inc");
if(!$dom = domxml_open_mem($xmlstr)) {
echo "Erreur lors de l'analyse d'un document\n";
exit;
}
$elements = $dom->get_elements_by_tagname("tbody");
$element = $elements[0];
$children = $element->child_nodes();
$child = $element->remove_child($children[0]);
echo "<pre>";
$xmlfile = $dom->dump_mem(true);
echo htmlentities($xmlfile);
echo "</pre>";
?>
]]>
</programlisting>
</example>
</para>
<para>
Voir aussi
<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
-->