|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- EN-Revision: d6f54016d62904cfd8200604aadd5e3f0d9bad97 Maintainer: PhilDaiguille Status: ready --> |
| 3 | +<!-- Reviewed: yes --> |
| 4 | +<refentry xml:id="domdocumentfragment.replacechildren" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 5 | + <refnamediv> |
| 6 | + <refname>DOMDocumentFragment::replaceChildren</refname> |
| 7 | + <refpurpose>Reemplaza los hijos en el fragmento</refpurpose> |
| 8 | + </refnamediv> |
| 9 | + |
| 10 | + <refsect1 role="description"> |
| 11 | + &reftitle.description; |
| 12 | + <methodsynopsis role="DOMDocumentFragment"> |
| 13 | + <modifier>public</modifier> <type>void</type><methodname>DOMDocumentFragment::replaceChildren</methodname> |
| 14 | + <methodparam rep="repeat"><type class="union"><type>DOMNode</type><type>string</type></type><parameter>nodes</parameter></methodparam> |
| 15 | + </methodsynopsis> |
| 16 | + <para> |
| 17 | + Reemplaza los hijos en el fragmento por nuevos <parameter>nodes</parameter>. |
| 18 | + </para> |
| 19 | + </refsect1> |
| 20 | + |
| 21 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domparentnode.replacechildren')/db:refsect1[@role='parameters'])" /> |
| 22 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domparentnode.replacechildren')/db:refsect1[@role='returnvalues'])" /> |
| 23 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domparentnode.replacechildren')/db:refsect1[@role='errors'])" /> |
| 24 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('domparentnode.replacechildren')/db:refsect1[@role='changelog'])" /> |
| 25 | + |
| 26 | + <refsect1 role="examples"> |
| 27 | + &reftitle.examples; |
| 28 | + <example xml:id="domdocumentfragment.replacechildren.example.basic"> |
| 29 | + <title>Ejemplo de <methodname>DOMDocumentFragment::replaceChildren</methodname></title> |
| 30 | + <para> |
| 31 | + Reemplaza los hijos por nuevos nodos. |
| 32 | + </para> |
| 33 | + <programlisting role="php"> |
| 34 | +<![CDATA[ |
| 35 | +<?php |
| 36 | +$doc = new DOMDocument; |
| 37 | +$doc->loadXML("<container><hello/></container>"); |
| 38 | +$fragment = $doc->createDocumentFragment(); |
| 39 | +$fragment->append("hello"); |
| 40 | +
|
| 41 | +$fragment->replaceChildren("beautiful", $doc->createElement("world")); |
| 42 | +
|
| 43 | +echo $doc->saveXML($fragment); |
| 44 | +?> |
| 45 | +]]> |
| 46 | + </programlisting> |
| 47 | + &example.outputs; |
| 48 | + <screen> |
| 49 | +<![CDATA[ |
| 50 | +beautiful |
| 51 | +<world/> |
| 52 | +]]> |
| 53 | + </screen> |
| 54 | + </example> |
| 55 | + </refsect1> |
| 56 | + |
| 57 | + <refsect1 role="seealso"> |
| 58 | + &reftitle.seealso; |
| 59 | + <simplelist> |
| 60 | + <member><methodname>DOMParentNode::replaceChildren</methodname></member> |
| 61 | + <member><methodname>DOMDocumentFragment::append</methodname></member> |
| 62 | + <member><methodname>DOMDocumentFragment::prepend</methodname></member> |
| 63 | + </simplelist> |
| 64 | + </refsect1> |
| 65 | + |
| 66 | +</refentry> |
| 67 | +<!-- Keep this comment at the end of the file |
| 68 | +Local variables: |
| 69 | +mode: sgml |
| 70 | +sgml-omittag:t |
| 71 | +sgml-shorttag:t |
| 72 | +sgml-minimize-attributes:nil |
| 73 | +sgml-always-quote-attributes:t |
| 74 | +sgml-indent-step:1 |
| 75 | +sgml-indent-data:t |
| 76 | +indent-tabs-mode:nil |
| 77 | +sgml-parent-document:nil |
| 78 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 79 | +sgml-exposed-tags:nil |
| 80 | +sgml-local-catalogs:nil |
| 81 | +sgml-local-ecat-files:nil |
| 82 | +End: |
| 83 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 84 | +vim: et tw=78 syn=sgml |
| 85 | +vi: ts=1 sw=1 |
| 86 | +--> |
0 commit comments