cvs: phpdoc-es /appendices tokens.xml /faq migration4.xml /language operators.xml /reference/domxml/functions DomDocumentType-internal-subset.xml
DomDocumentType-name.xml DomDocumentType-notations.xml DomDocumentType-public-id.xml DomDocumentType-system-id.xml DomElement-get-attribute-node.xml
DomElement-get-attribute.xml DomElement-get-elements-by-tagname.xml DomElement-has-attribute.xml DomElement-remove-attribute.xml
DomElement-set-attribute-node.xml DomElement-set-attribute.xml DomElement-tagname.xml DomNode-add-namespace.xml DomNode-append-child.xml
DomNode-append-sibling.xml /reference/filesystem/functions fseek.xml ftell.xml fwrite.xml /reference/zip reference.xml
| From: | Leonardo Boshell | Date: | Wed, 16 Jun 2004 02:34:07 +0000 |
| Subject: | cvs: phpdoc-es /appendices tokens.xml /faq migration4.xml /language operators.xml /reference/domxml/functions DomDocumentType-internal-subset.xml DomDocumentType-name.xml DomDocumentType-notations.xml DomDocumentType-public-id.xml DomDocumentType-system-id.xml DomElement-get-attribute-node.xml DomElement-get-attribute.xml DomElement-get-elements-by-tagname.xml DomElement-has-attribute.xml DomElement-remove-attribute.xml DomElement-set-attribute-node.xml DomElement-set-attribute.xml DomElement-tagname.xml DomNode-add-namespace.xml DomNode-append-child.xml DomNode-append-sibling.xml /reference/filesystem/functions fseek.xml ftell.xml fwrite.xml /reference/zip reference.xml |
||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-615@lists.php.net to get a copy of this message | ||
lboshell Tue Jun 15 22:34:07 2004 EDT
Added files:
/phpdoc-es/reference/domxml/functions
DomDocumentType-internal-subset.xml
DomDocumentType-name.xml
DomDocumentType-notations.xml
DomDocumentType-public-id.xml
DomDocumentType-system-id.xml
DomElement-get-attribute-node.xml
DomElement-get-attribute.xml
DomElement-get-elements-by-tagname.xml
DomElement-has-attribute.xml
DomElement-remove-attribute.xml
DomElement-set-attribute-node.xml
DomElement-set-attribute.xml
DomElement-tagname.xml
DomNode-add-namespace.xml
DomNode-append-child.xml
DomNode-append-sibling.xml
Modified files:
/phpdoc-es/language operators.xml
/phpdoc-es/appendices tokens.xml
/phpdoc-es/faq migration4.xml
/phpdoc-es/reference/filesystem/functions fseek.xml ftell.xml
fwrite.xml
/phpdoc-es/reference/zip reference.xml
Log:
- Actualizaciones y correcciones
- Nuevos archivos de domxml
http://cvs.php.net/diff.php/phpdoc-es/language/operators.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc-es/language/operators.xml diff -u phpdoc-es/language/operators.xml:1.12 phpdoc-es/language/operators.xml:1.13 --- phpdoc-es/language/operators.xml:1.12 Tue Jun 1 23:38:36 2004 +++ phpdoc-es/language/operators.xml Tue Jun 15 22:34:06 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- EN-Revision: 1.68 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.13 $ --> +<!-- EN-Revision: 1.70 Maintainer: lboshell Status: ready --> <chapter id="language.operators"> <title>Operadores</title> <simpara> @@ -35,15 +35,16 @@ <title>Precedencia de Operadores</title> <para> La precedencia de un operador indica qué tan "cerca" se - agrupan dos expresiones. Por ejemplo, en la - expresión <literal>1 + 5 * 3</literal>, la respuesta - es <literal>16</literal> y no - <literal>18</literal>, ya que el operador de multiplicación - ("*") tiene una mayor precedencia que el operador de - adición ("+"). Los paréntesis pueden ser usados para - marcar la precedencia, si resulta necesario. Por - ejemplo: <literal>(1 + 5) * 3</literal> evalúa - a <literal>18</literal>. + agrupan dos expresiones. Por ejemplo, en la expresión + <literal>1 + 5 * 3</literal>, la respuesta es + <literal>16</literal> y no <literal>18</literal>, ya que el + operador de multiplicación ("*") tiene una mayor + precedencia que el operador de adición ("+"). Los + paréntesis pueden ser usados para marcar la precedencia, si + resulta necesario. Por ejemplo: <literal>(1 + 5) * 3</literal> + evalúa a <literal>18</literal>. Si la precedencia de los + operadores es la misma, se utiliza una asociación de + izquierda a derecha. </para> <para> La siguiente tabla lista la precedencia de los operadores, con http://cvs.php.net/diff.php/phpdoc-es/appendices/tokens.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-es/appendices/tokens.xml diff -u phpdoc-es/appendices/tokens.xml:1.5 phpdoc-es/appendices/tokens.xml:1.6 --- phpdoc-es/appendices/tokens.xml:1.5 Fri May 23 08:58:09 2003 +++ phpdoc-es/appendices/tokens.xml Tue Jun 15 22:34:07 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.10 Maintainer: rafael Status: ready --> <appendix id="tokens"> <title>Lista de Identificadores (tokens) del Analizador</title> @@ -207,7 +207,7 @@ <entry>T_DOUBLE_ARROW</entry> <entry>=></entry> <entry><link linkend="language.types.array.syntax">Sintaxis de - Arreglos</link> + Matrices</link> </entry> </row> <row> http://cvs.php.net/diff.php/phpdoc-es/faq/migration4.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/faq/migration4.xml diff -u phpdoc-es/faq/migration4.xml:1.2 phpdoc-es/faq/migration4.xml:1.3 --- phpdoc-es/faq/migration4.xml:1.2 Sat Jan 17 06:38:50 2004 +++ phpdoc-es/faq/migration4.xml Tue Jun 15 22:34:07 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.11 Maintainer: lboshell Status: ready --> <chapter id="faq.migration4"> <title>Migración de PHP 3 a PHP 4</title> <titleabbrev>Migración de PHP 3 a PHP 4</titleabbrev> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fseek.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fseek.xml diff -u phpdoc-es/reference/filesystem/functions/fseek.xml:1.1 phpdoc-es/reference/filesystem/functions/fseek.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fseek.xml:1.1 Sun Apr 14 20:13:59 2002 +++ phpdoc-es/reference/filesystem/functions/fseek.xml Tue Jun 15 22:34:07 2004 @@ -1,33 +1,87 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fseek' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fseek"> <refnamediv> <refname>fseek</refname> - <refpurpose>Sitúa el apuntador a un fichero</refpurpose> + <refpurpose>Realiza una búsqueda sobre un apuntador de + archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> - <type>int</type><methodname>fseek</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> - <methodparam><type>int</type><parameter>offset</parameter></methodparam> + <type>int</type><methodname>fseek</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> + <methodparam><type>int</type><parameter>desplazamiento</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>desde</parameter></methodparam> </methodsynopsis> <para> - Fija el indicador de posición del fichero referenciado por fp a - tantos bytes como indica offset. Es equivalente a la llamada (en C) - <literal>fseek(fp, offset, SEEK_SET)</literal>. + Establece el indicador de posición para el archivo + referenciado por <parameter>gestor</parameter>. La nueva + posición, medida en bytes desde el comienzo del archivo, + so obtiene al sumar <parameter>desplazamiento</parameter> con la + posición especificada por <parameter>desde</parameter>, + cuyos valores se definen como se indica a continuación: + <simplelist> + <member><constant>SEEK_SET</constant> - Define la + posición igual a <parameter>desplazamiento</parameter> + bytes.</member> + <member><constant>SEEK_CUR</constant> - Define la + posición como la posición actual más + <parameter>desplazamiento</parameter>.</member> + <member><constant>SEEK_END</constant> - Define la + posición como el final-de-archivo más + <parameter>desplazamiento</parameter>. (Para moverse a una + posición anterior al final-de-archivo, es necesario pasar + un valor negativo en + <parameter>desplazamiento</parameter>.)</member> + </simplelist> </para> <para> - Si va bien, devuelve 0; en otro caso, devuelve -1. Tener en cuenta que - situarse más alla de EOF no se considera un error. + Si no se especifica <parameter>desde</parameter>, se asume que + sea <constant>SEEK_SET</constant>. </para> <para> - No puede usarse sobre apuntadores de ficheros devueltos por - <function>fopen</function> si usan los formatos "http://" or "ftp://". + De tener éxito, la función devuelve 0; de lo + contrario devuelve -1. Note que realizar una reubicación + más allá del final de archivo no se considera un + error. </para> <para> - Ver también <function>ftell</function> y + <example> + <title>Ejemplo de <function>fseek</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$da = fopen('algun_archivo.txt'); + +// leer datos +$datos = fgets($da, 4096); + +// moverse de vuelta al comienzo del archivo +// igual que rewind($da); +fseek($da, 0); + +?> +]]> + </programlisting> + </example> + </para> + <para> + Puede que no sea posible usar la función sobre apuntadores + de archivo devueltos por <function>fopen</function> si usan los + formatos "http://" o "ftp://". + </para> + <note> + <para> + El argumento <parameter>desde</parameter> fue agregado + después de PHP 4.0.0. + </para> + </note> + <para> + Vea también <function>ftell</function> y <function>rewind</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/ftell.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/ftell.xml diff -u phpdoc-es/reference/filesystem/functions/ftell.xml:1.1 phpdoc-es/reference/filesystem/functions/ftell.xml:1.2 --- phpdoc-es/reference/filesystem/functions/ftell.xml:1.1 Sun Apr 14 20:13:59 2002 +++ phpdoc-es/reference/filesystem/functions/ftell.xml Tue Jun 15 22:34:07 2004 @@ -1,33 +1,57 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'ftell' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.ftell"> <refnamediv> <refname>ftell</refname> - <refpurpose>Pregunta por la posición del apuntador de lectura/escritura de un fichero</refpurpose> + <refpurpose>Indica la posición de lectura/escritura del + apuntador de archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> - <type>int</type><methodname>ftell</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> + <type>int</type><methodname>ftell</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> </methodsynopsis> <para> - Devuelve la posición del apuntador de fichero referenciado por fp; - es decir, la distancia en la secuencia del fichero. + Devuelve la posición del apuntador de archivo indicado por + <parameter>gestor</parameter>; es decir, su desplazamiento al + interior de la secuencia de archivo. </para> <para> Si ocurre un error, devuelve &false;. </para> <para> - El apuntador al fichero debe ser válido, y debe referirse a - The file pointer must be valid, and must point to a file - un fichero abierto con éxito por <function>fopen</function> o - <function>popen</function>. + El apuntador de archivo debe ser válido, y debe apuntar a + un archivo abierto satisfactoriamente por + <function>fopen</function> o <function>popen</function>. </para> - <para> - Ver también <function>fopen</function>, <function>popen</function>, - <function>fseek</function> y <function>rewind</function>. + <para> + <example> + <title>Ejemplo de <function>ftell</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// abre un archivo y lee algunos datos +$da = fopen("/etc/passwd", "r"); +$datos = fgets($da, 12); + +// en donde estamos ? +echo ftell($da); // 11 + +fclose($da); + +?> +]]> + </programlisting> + </example> + </para> + <para> + Vea también <function>fopen</function>, + <function>popen</function>, <function>fseek</function>, and + <function>rewind</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fwrite.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fwrite.xml diff -u phpdoc-es/reference/filesystem/functions/fwrite.xml:1.1 phpdoc-es/reference/filesystem/functions/fwrite.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fwrite.xml:1.1 Sun Apr 14 20:13:59 2002 +++ phpdoc-es/reference/filesystem/functions/fwrite.xml Tue Jun 15 22:34:07 2004 @@ -1,41 +1,93 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fwrite' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fwrite"> <refnamediv> <refname>fwrite</refname> - <refpurpose>Escribe ficheros en plan binario</refpurpose> + <refpurpose>Escritura sobre archivos, segura con material + binario</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> - <type>int</type><methodname>fwrite</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> - <methodparam><type>string</type><parameter>string</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - length - </parameter></methodparam> + <type>int</type><methodname>fwrite</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> + <methodparam><type>string</type><parameter>cadena</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>longitud</parameter></methodparam> </methodsynopsis> <simpara> - <function>fwrite</function> escribe el contenido de - <parameter>string</parameter> al fichero apuntado por - <parameter>fp</parameter>. Si se da el argumento - <parameter>length</parameter>, la escritura acaba antes de - que <parameter>length</parameter> bytes sean escritos o se - alcance el final de <parameter>string</parameter>, lo que + <function>fwrite</function> escribe los contenidos de + <parameter>cadena</parameter> a la secuencia de archivo apuntada + por <parameter>gestor</parameter>. Si el argumento + <parameter>longitud</parameter> es entregado, la escritura se + detendrá después de que + <parameter>longitud</parameter> bytes hayan sido escritos, o al + alcanzar el final de <parameter>cadena</parameter>, aquello que ocurra primero. </simpara> <simpara> - Tener en cuenta que si se da el argumento <parameter>length</parameter>, - entonces la opción de configuración <link + <function>fwrite</function> devuelve el número de bytes + escritos, o &false; en caso de fallo. + </simpara> + <simpara> + Note que si se utiliza el argumento + <parameter>longitud</parameter>, entonces la opción de + configuración <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link> - será ignorada y los caracteres de barra no se quitarán de la - cadena <parameter>string</parameter>. + será ignorada y no se eliminarán caracteres de + barra desde la <parameter>cadena</parameter>. </simpara> + <note> + <para> + En los sistemas que diferencian entre archivos binarios y de + texto (es decir, Windows) el archivo debe ser abierto incluyendo + el valor 'b' en el parámetro de modo de + <function>fopen</function>. + </para> + </note> + <para> + <example> + <title>Un ejemplo sencillo de fwrite</title> + <programlisting role="php"> +<![CDATA[ +<?php +$nombre_archivo = 'prueba.txt'; +$contenido = "Agregar esto al archivo\n"; + +// Asegurarse primero de que el archivo existe y puede escribirse sobre el. +if (is_writable($nombre_archivo)) { + + // En nuestro ejemplo estamos abriendo $nombre_archivo en modo de adicion. + // El apuntador de archivo se encuentra al final del archivo, asi que + // alli es donde ira $contenido cuando llamemos fwrite(). + if (!$gestor = fopen($nombre_archivo, 'a')) { + echo "No se puede abrir el archivo ($nombre_archivo)"; + exit; + } + + // Escribir $contenido a nuestro arcivo abierto. + if (fwrite($gestor, $contenido) === FALSE) { + echo "No se puede escribir al archivo ($nombre_archivo)"; + exit; + } + + echo "Éxito, se escribió ($contenido) al archivo ($nombre_archivo)"; + + fclose($gestor); + +} else { + echo "No se puede escribir sobre el archivo $nombre_archivo"; +} +?> +]]> + </programlisting> + </example> + </para> <simpara> - Ver también <function>fread</function>, <function>fopen</function>, - <function>fsockopen</function>, <function>popen</function>, y - <function>fputs</function>. + Vea también <function>fread</function>, + <function>fopen</function>, <function>fsockopen</function>, and + <function>popen</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/zip/reference.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/zip/reference.xml diff -u phpdoc-es/reference/zip/reference.xml:1.2 phpdoc-es/reference/zip/reference.xml:1.3 --- phpdoc-es/reference/zip/reference.xml:1.2 Tue Jan 20 22:34:40 2004 +++ phpdoc-es/reference/zip/reference.xml Tue Jun 15 22:34:07 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- EN-Revision: 1.5 Maintainer: javi Status: ready --> <reference id="ref.zip"> <title>Funciones de manejo de archivos Zip (sólo @@ -19,12 +19,12 @@ &reftitle.required; <para> Este módulo utiliza las funciones de la - librería <ulink url="&url.zziplib;">ZZIPlib</ulink>, + biblioteca <ulink url="&url.zziplib;">ZZIPlib</ulink>, creada por Guido Draheim. Se requiere una versión de ZZIPlib >= 0.10.6. </para> <para> - Debe tenerse en cuenta que la anterior librería solamente + Debe tenerse en cuenta que la anterior biblioteca solamente proporciona un conjunto limitado de funciones para el tratamiento de archivos en formato Zip. Para poder crear los archivos en formato Zip se requiere del uso de alguna herramienta externa a http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-internal-subset.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-internal-subset.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-internal-subset.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-internal-subset'> <refnamediv> <refname>DomDocumentType->internal_subset</refname> <refpurpose> Devuelve el sub-conjunto interno </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomDocumentType->internal_subset</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-name.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-name.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-name'> <refnamediv> <refname>DomDocumentType->name</refname> <refpurpose> Devuelve el nombre del tipo de documento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomDocumentType->name</methodname> <void/> </methodsynopsis> <para> Esta función devuelve el nombre del tipo de documento. </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-notations.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-notations.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-notations.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-notations'> <refnamediv> <refname>DomDocumentType->notations</refname> <refpurpose> Devuelve una lista de notaciones </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>DomDocumentType->notations</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-public-id.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-public-id.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-public-id.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-public-id'> <refnamediv> <refname>DomDocumentType->public_id</refname> <refpurpose> Devuelve el id público del tipo de documento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomDocumentType->public_id</methodname> <void/> </methodsynopsis> <para> Esta función devuelve el id público del tipo de documento. </para> <para> El siguiente ejemplo no produce ninguna salida. <example> <title>Recuperación del id público</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error al analizar el documento\n"; exit; } $tipo_doc = $dom->doctype(); echo $tipo_doc->public_id(); ?> ]]> </programlisting> </example> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-system-id.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-system-id.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-system-id.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-system-id'> <refnamediv> <refname>DomDocumentType->system_id</refname> <refpurpose> Devuelve el id de sistema del tipo de documento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomDocumentType->system_id</methodname> <void/> </methodsynopsis> <para> Devuelve el id de sistema del tipo de documento. </para> <para> El siguiente ejemplo imprime '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'. <example> <title>Recuperación del id de sistema</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error mientras se analizaba el documento\n"; exit; } $tipo_doc = $dom->doctype(); echo $tipo_doc->system_id(); ?> ]]> </programlisting> </example> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-get-attribute-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-get-attribute-node.xml +++ phpdoc-es/reference/domxml/functions/DomElement-get-attribute-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.27 --> <refentry id='function.domelement-get-attribute-node'> <refnamediv> <refname>DomElement->get_attribute_node</refname> <refpurpose> Devuelve el valor del atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomElement->get_attribute_node</methodname> <methodparam><type>object</type><parameter>atr</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-get-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-get-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-get-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.28 --> <refentry id='function.domelement-get-attribute'> <refnamediv> <refname>DomElement->get_attribute</refname> <refpurpose> Devuelve el valor del atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomElement->get_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> Devuelve el atributo con nombre <parameter>nombre</parameter> del nodo actual. </para> <para> (Sólo PHP >= 4.3) Si no se encuentra un atributo con el nombre dado, se devuelve una cadena vacía. </para> <para> Vea también <function>domelement_set_attribute</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-get-elements-by-tagname.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-get-elements-by-tagname.xml +++ phpdoc-es/reference/domxml/functions/DomElement-get-elements-by-tagname.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domelement-get-elements-by-tagname'> <refnamediv> <refname>DomElement->get_elements_by_tagname</refname> <refpurpose> Obtiene elementos por el nombre de etiqueta </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->get_elements_by_tagname</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> Esta función devuelve una matriz con todos los elementos que tienen <parameter>nombre</parameter> como su nombre de etiqueta. Cada elemento de la matriz es de tipo DomElement. </para> <para> <example> <title>Obtener el contenido</title> <programlisting role="php"> <![CDATA[ <?php if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error al analizar el documento\n"; exit; } $raiz = $dom->document_element(); $matriz_nodos = $raiz->get_elements_by_tagname("element"); for ($i = 0; $i<count($matriz_nodos); $i++) { $nodo = $matriz_nodos[$i]; echo "El elemento[$i] es: " . $nodo->get_content(); } ?> ]]> </programlisting> </example> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-has-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-has-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-has-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domelement-has-attribute'> <refnamediv> <refname>DomElement->has_attribute</refname> <refpurpose> Verifica si un atributo existe </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->has_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-remove-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-remove-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-remove-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domelement-remove-attribute'> <refnamediv> <refname>DomElement->remove_attribute</refname> <refpurpose> Elimina un atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->remove_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-set-attribute-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-set-attribute-node.xml +++ phpdoc-es/reference/domxml/functions/DomElement-set-attribute-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <!-- This function is not implemented at all for the time being <refentry id='function.domelement-set-attribute-node'> <refnamediv> <refname>DomElement->set_attribute_node</refname> <refpurpose> Agrega un nuevo atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->set_attribute_node</methodname> <methodparam><type>object</type><parameter>atr</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-set-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-set-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-set-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.27 --> <refentry id='function.domelement-set-attribute'> <refnamediv> <refname>DomElement->set_attribute</refname> <refpurpose> Agrega un nuevo atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->set_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> <methodparam><type>string</type><parameter>valor</parameter></methodparam> </methodsynopsis> <para> Define un antributo con el nombre <parameter>nombre</parameter> con el valor dado. Si el atributo no existe, será creado. </para> <para> <example> <title>Definición de un atributo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo_nuevo = $doc->append_child($nodo); $nodo_nuevo->set_attribute("align", "left"); ?> ]]> </programlisting> </example> </para> <para> Vea también <function>domelement_get_attribute</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-tagname.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-tagname.xml +++ phpdoc-es/reference/domxml/functions/DomElement-tagname.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.6 --> <refentry id='function.domelement-tagname'> <refnamediv> <refname>DomElement->tagname</refname> <refpurpose> Devuelve el nombre del elemento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomElement->tagname</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-add-namespace.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-add-namespace.xml +++ phpdoc-es/reference/domxml/functions/DomNode-add-namespace.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-add-namespace'> <refnamediv> <refname>DomNode->add_namespace</refname> <refpurpose> Agrega una declaración de espacio de nombres a un nodo. </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomNode->add_namespace</methodname> <methodparam><type>string</type><parameter>uri</parameter></methodparam> <methodparam><type>string</type><parameter>prefijo</parameter></methodparam> </methodsynopsis> <para> </para> <para> Vea también <function>domdocument_create_element_ns</function>, y <function>domnode_set_namespace</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-append-child.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-append-child.xml +++ phpdoc-es/reference/domxml/functions/DomNode-append-child.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.40 --> <refentry id='function.domnode-append-child'> <refnamediv> <refname>DomNode->append_child</refname> <refpurpose> Agrega un nuevo hijo al final del grupo de hijos </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomNode->append_child</methodname> <methodparam><type>object</type><parameter>nodo_nuevo</parameter></methodparam> </methodsynopsis> <para> Esta función agrega un hijo a una lista existente de hijos o crea una nueva lista de hijos. El hijo puede ser creado, por ejemplo, con <function>domdocument_create_element</function>, <function>domdocument_create_text</function> etc. o simplemente mediante el uso de otro nodo. </para> <para> (PHP < 4.3) Antes de que un nuevo hijo sea agregado, éste es duplicado. Por lo tanto el nuevo hijo es una nueva copia que puede ser modificada sin cambiar el nodo que fue pasado a esta función. Si el nodo pasado tiene hijos, ellos serán duplicados también, lo que facilita la duplicación de grandes segmentos de un documento XML. El valor de retorno es el hijo agregado. Si planea realizar modificaciones posteriores sobre el hijo agregado, debe usar el nodo devuelto. </para> <para> (PHP 4.3.0/4.3.1) El nuevo hijo <parameter>nodo_nuevo</parameter> es enlazado primero desde su contexto actual, si ya se trata de un hijo de DomNode. Por lo tanto el nodo es movido y no una copia del nodo. </para> <para> (PHP >= 4.3.2) El nuevo hijo <parameter>nodo_nuevo</parameter> es primera separado de su contexto actual, si éste ya existe en el árbol. Por lo tanto el nodo es movido y no copiado. Este debe ser su comportamiento de acuerdo a las especificaciones del W3C. Si desea duplicar segmentos grandes de un documento XML, use DomNode->clone_node() antes de agregar. </para> <para> El siguiente ejemplo agrega un nuevo nodo tipo elemento a un documento nuevo y define el atributo "align" como "left". <example> <title>Agregar un hijo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo_nuevo = $doc->append_child($nodo); $nodo_nuevo->set_attribute("align", "left"); ?> ]]> </programlisting> </example> El anterior ejemplo pudo ser escrito también como: <example> <title>Agregar un hijo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo->set_attribute("align", "left"); $nodo_nuevo = $doc->append_child($nodo); ?> ]]> </programlisting> </example> Un ejemplo más complejo se presenta a continuación. Primero busca cierto elemento, lo duplica incluyendo sus hijos y lo agrega como un hermano. Finalmente un nuevo atributo es agregado a uno de los hijos del nuevo hermano y el documento completo es volcado. <example> <title>Agregar un hijo</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error al analizar el documento\n"; exit; } $elementos = $dom->get_elements_by_tagname("informaltable"); print_r($elementos); $elemento = $elementos[0]; $padre = $elemento->parent_node(); $nodo_nuevo = $padre->append_child($elemento); $hijos = $nodo_nuevo->children(); $atr = $hijos[1]->set_attribute("align", "left"); echo "<pre>"; $archivo_xml = $dom->dump_mem(); echo htmlentities($archivo_xml); echo "</pre>"; ?> ]]> </programlisting> </example> El ejemplo anterior pudo crearse también con <function>domnode_insert_before</function> en lugar de <function>domnode_append_child</function>. </para> <para> Vea también <function>domnode_insert_before</function>, y <function>domnode_clone_node</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-append-sibling.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-append-sibling.xml +++ phpdoc-es/reference/domxml/functions/DomNode-append-sibling.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <refentry id='function.domnode-append-sibling'> <refnamediv> <refname>DomNode->append_sibling</refname> <refpurpose> Agrega un nuevo hermano a un nodo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomNode->append_sibling</methodname> <methodparam><type>object</type><parameter>nodo_nuevo</parameter></methodparam> </methodsynopsis> <para> Esta función agrega un hermano a un nodo existente. El hijo puede ser creado, por ejemplo, con <function>domdocument_create_element</function>, <function>domdocument_create_text</function> etc. o simplemente mediante el uso de otro nodo. </para> <para> Antes de que un nuevo hermano sea agregado, éste es duplicado. Por lo tanto, el nuevo hijo es una copia completamente nueva que puede modificarse sin cambiar el nodo que fue pasado a ésta función. Si el nodo pasado tiene hijos, ellos serán duplicados también, lo que facilita enormemente la duplicación de partes grandes de un documento XML. El valor de retorno es el hermano agregado. Si planea hacer modificaciones posteriores al hermano agregado, debe usar el nodo devuelto. </para> <para> Esta función ha sido agregada para ofrecer el comportamiento de <function>domnode_append_child</function>, del modo que funcionaba hasta PHP 4.2. </para> <para> Vea también <function>domnode_append_before</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 -->
http://cvs.php.net/diff.php/phpdoc-es/language/operators.xml?r1=1.12&r2=1.13&ty=u Index: phpdoc-es/language/operators.xml diff -u phpdoc-es/language/operators.xml:1.12 phpdoc-es/language/operators.xml:1.13 --- phpdoc-es/language/operators.xml:1.12 Tue Jun 1 23:38:36 2004 +++ phpdoc-es/language/operators.xml Tue Jun 15 22:34:06 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> -<!-- EN-Revision: 1.68 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.13 $ --> +<!-- EN-Revision: 1.70 Maintainer: lboshell Status: ready --> <chapter id="language.operators"> <title>Operadores</title> <simpara> @@ -35,15 +35,16 @@ <title>Precedencia de Operadores</title> <para> La precedencia de un operador indica qué tan "cerca" se - agrupan dos expresiones. Por ejemplo, en la - expresión <literal>1 + 5 * 3</literal>, la respuesta - es <literal>16</literal> y no - <literal>18</literal>, ya que el operador de multiplicación - ("*") tiene una mayor precedencia que el operador de - adición ("+"). Los paréntesis pueden ser usados para - marcar la precedencia, si resulta necesario. Por - ejemplo: <literal>(1 + 5) * 3</literal> evalúa - a <literal>18</literal>. + agrupan dos expresiones. Por ejemplo, en la expresión + <literal>1 + 5 * 3</literal>, la respuesta es + <literal>16</literal> y no <literal>18</literal>, ya que el + operador de multiplicación ("*") tiene una mayor + precedencia que el operador de adición ("+"). Los + paréntesis pueden ser usados para marcar la precedencia, si + resulta necesario. Por ejemplo: <literal>(1 + 5) * 3</literal> + evalúa a <literal>18</literal>. Si la precedencia de los + operadores es la misma, se utiliza una asociación de + izquierda a derecha. </para> <para> La siguiente tabla lista la precedencia de los operadores, con http://cvs.php.net/diff.php/phpdoc-es/appendices/tokens.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-es/appendices/tokens.xml diff -u phpdoc-es/appendices/tokens.xml:1.5 phpdoc-es/appendices/tokens.xml:1.6 --- phpdoc-es/appendices/tokens.xml:1.5 Fri May 23 08:58:09 2003 +++ phpdoc-es/appendices/tokens.xml Tue Jun 15 22:34:07 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.10 Maintainer: rafael Status: ready --> <appendix id="tokens"> <title>Lista de Identificadores (tokens) del Analizador</title> @@ -207,7 +207,7 @@ <entry>T_DOUBLE_ARROW</entry> <entry>=></entry> <entry><link linkend="language.types.array.syntax">Sintaxis de - Arreglos</link> + Matrices</link> </entry> </row> <row> http://cvs.php.net/diff.php/phpdoc-es/faq/migration4.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/faq/migration4.xml diff -u phpdoc-es/faq/migration4.xml:1.2 phpdoc-es/faq/migration4.xml:1.3 --- phpdoc-es/faq/migration4.xml:1.2 Sat Jan 17 06:38:50 2004 +++ phpdoc-es/faq/migration4.xml Tue Jun 15 22:34:07 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.11 Maintainer: lboshell Status: ready --> <chapter id="faq.migration4"> <title>Migración de PHP 3 a PHP 4</title> <titleabbrev>Migración de PHP 3 a PHP 4</titleabbrev> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fseek.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fseek.xml diff -u phpdoc-es/reference/filesystem/functions/fseek.xml:1.1 phpdoc-es/reference/filesystem/functions/fseek.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fseek.xml:1.1 Sun Apr 14 20:13:59 2002 +++ phpdoc-es/reference/filesystem/functions/fseek.xml Tue Jun 15 22:34:07 2004 @@ -1,33 +1,87 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fseek' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fseek"> <refnamediv> <refname>fseek</refname> - <refpurpose>Sitúa el apuntador a un fichero</refpurpose> + <refpurpose>Realiza una búsqueda sobre un apuntador de + archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> - <type>int</type><methodname>fseek</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> - <methodparam><type>int</type><parameter>offset</parameter></methodparam> + <type>int</type><methodname>fseek</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> + <methodparam><type>int</type><parameter>desplazamiento</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>desde</parameter></methodparam> </methodsynopsis> <para> - Fija el indicador de posición del fichero referenciado por fp a - tantos bytes como indica offset. Es equivalente a la llamada (en C) - <literal>fseek(fp, offset, SEEK_SET)</literal>. + Establece el indicador de posición para el archivo + referenciado por <parameter>gestor</parameter>. La nueva + posición, medida en bytes desde el comienzo del archivo, + so obtiene al sumar <parameter>desplazamiento</parameter> con la + posición especificada por <parameter>desde</parameter>, + cuyos valores se definen como se indica a continuación: + <simplelist> + <member><constant>SEEK_SET</constant> - Define la + posición igual a <parameter>desplazamiento</parameter> + bytes.</member> + <member><constant>SEEK_CUR</constant> - Define la + posición como la posición actual más + <parameter>desplazamiento</parameter>.</member> + <member><constant>SEEK_END</constant> - Define la + posición como el final-de-archivo más + <parameter>desplazamiento</parameter>. (Para moverse a una + posición anterior al final-de-archivo, es necesario pasar + un valor negativo en + <parameter>desplazamiento</parameter>.)</member> + </simplelist> </para> <para> - Si va bien, devuelve 0; en otro caso, devuelve -1. Tener en cuenta que - situarse más alla de EOF no se considera un error. + Si no se especifica <parameter>desde</parameter>, se asume que + sea <constant>SEEK_SET</constant>. </para> <para> - No puede usarse sobre apuntadores de ficheros devueltos por - <function>fopen</function> si usan los formatos "http://" or "ftp://". + De tener éxito, la función devuelve 0; de lo + contrario devuelve -1. Note que realizar una reubicación + más allá del final de archivo no se considera un + error. </para> <para> - Ver también <function>ftell</function> y + <example> + <title>Ejemplo de <function>fseek</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$da = fopen('algun_archivo.txt'); + +// leer datos +$datos = fgets($da, 4096); + +// moverse de vuelta al comienzo del archivo +// igual que rewind($da); +fseek($da, 0); + +?> +]]> + </programlisting> + </example> + </para> + <para> + Puede que no sea posible usar la función sobre apuntadores + de archivo devueltos por <function>fopen</function> si usan los + formatos "http://" o "ftp://". + </para> + <note> + <para> + El argumento <parameter>desde</parameter> fue agregado + después de PHP 4.0.0. + </para> + </note> + <para> + Vea también <function>ftell</function> y <function>rewind</function>. </para> </refsect1> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/ftell.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/ftell.xml diff -u phpdoc-es/reference/filesystem/functions/ftell.xml:1.1 phpdoc-es/reference/filesystem/functions/ftell.xml:1.2 --- phpdoc-es/reference/filesystem/functions/ftell.xml:1.1 Sun Apr 14 20:13:59 2002 +++ phpdoc-es/reference/filesystem/functions/ftell.xml Tue Jun 15 22:34:07 2004 @@ -1,33 +1,57 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'ftell' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.ftell"> <refnamediv> <refname>ftell</refname> - <refpurpose>Pregunta por la posición del apuntador de lectura/escritura de un fichero</refpurpose> + <refpurpose>Indica la posición de lectura/escritura del + apuntador de archivo</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> - <type>int</type><methodname>ftell</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> + <type>int</type><methodname>ftell</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> </methodsynopsis> <para> - Devuelve la posición del apuntador de fichero referenciado por fp; - es decir, la distancia en la secuencia del fichero. + Devuelve la posición del apuntador de archivo indicado por + <parameter>gestor</parameter>; es decir, su desplazamiento al + interior de la secuencia de archivo. </para> <para> Si ocurre un error, devuelve &false;. </para> <para> - El apuntador al fichero debe ser válido, y debe referirse a - The file pointer must be valid, and must point to a file - un fichero abierto con éxito por <function>fopen</function> o - <function>popen</function>. + El apuntador de archivo debe ser válido, y debe apuntar a + un archivo abierto satisfactoriamente por + <function>fopen</function> o <function>popen</function>. </para> - <para> - Ver también <function>fopen</function>, <function>popen</function>, - <function>fseek</function> y <function>rewind</function>. + <para> + <example> + <title>Ejemplo de <function>ftell</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +// abre un archivo y lee algunos datos +$da = fopen("/etc/passwd", "r"); +$datos = fgets($da, 12); + +// en donde estamos ? +echo ftell($da); // 11 + +fclose($da); + +?> +]]> + </programlisting> + </example> + </para> + <para> + Vea también <function>fopen</function>, + <function>popen</function>, <function>fseek</function>, and + <function>rewind</function>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/filesystem/functions/fwrite.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-es/reference/filesystem/functions/fwrite.xml diff -u phpdoc-es/reference/filesystem/functions/fwrite.xml:1.1 phpdoc-es/reference/filesystem/functions/fwrite.xml:1.2 --- phpdoc-es/reference/filesystem/functions/fwrite.xml:1.1 Sun Apr 14 20:13:59 2002 +++ phpdoc-es/reference/filesystem/functions/fwrite.xml Tue Jun 15 22:34:07 2004 @@ -1,41 +1,93 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./es/functions/filesystem.xml, last change in rev 1.1 --> -<!-- last change to 'fwrite' in en/ tree in rev 1.2 --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> +<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 --> <refentry id="function.fwrite"> <refnamediv> <refname>fwrite</refname> - <refpurpose>Escribe ficheros en plan binario</refpurpose> + <refpurpose>Escritura sobre archivos, segura con material + binario</refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> - <type>int</type><methodname>fwrite</methodname> - <methodparam><type>int</type><parameter>fp</parameter></methodparam> - <methodparam><type>string</type><parameter>string</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter> - length - </parameter></methodparam> + <type>int</type><methodname>fwrite</methodname> + <methodparam><type>resource</type><parameter>gestor</parameter></methodparam> + <methodparam><type>string</type><parameter>cadena</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>longitud</parameter></methodparam> </methodsynopsis> <simpara> - <function>fwrite</function> escribe el contenido de - <parameter>string</parameter> al fichero apuntado por - <parameter>fp</parameter>. Si se da el argumento - <parameter>length</parameter>, la escritura acaba antes de - que <parameter>length</parameter> bytes sean escritos o se - alcance el final de <parameter>string</parameter>, lo que + <function>fwrite</function> escribe los contenidos de + <parameter>cadena</parameter> a la secuencia de archivo apuntada + por <parameter>gestor</parameter>. Si el argumento + <parameter>longitud</parameter> es entregado, la escritura se + detendrá después de que + <parameter>longitud</parameter> bytes hayan sido escritos, o al + alcanzar el final de <parameter>cadena</parameter>, aquello que ocurra primero. </simpara> <simpara> - Tener en cuenta que si se da el argumento <parameter>length</parameter>, - entonces la opción de configuración <link + <function>fwrite</function> devuelve el número de bytes + escritos, o &false; en caso de fallo. + </simpara> + <simpara> + Note que si se utiliza el argumento + <parameter>longitud</parameter>, entonces la opción de + configuración <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link> - será ignorada y los caracteres de barra no se quitarán de la - cadena <parameter>string</parameter>. + será ignorada y no se eliminarán caracteres de + barra desde la <parameter>cadena</parameter>. </simpara> + <note> + <para> + En los sistemas que diferencian entre archivos binarios y de + texto (es decir, Windows) el archivo debe ser abierto incluyendo + el valor 'b' en el parámetro de modo de + <function>fopen</function>. + </para> + </note> + <para> + <example> + <title>Un ejemplo sencillo de fwrite</title> + <programlisting role="php"> +<![CDATA[ +<?php +$nombre_archivo = 'prueba.txt'; +$contenido = "Agregar esto al archivo\n"; + +// Asegurarse primero de que el archivo existe y puede escribirse sobre el. +if (is_writable($nombre_archivo)) { + + // En nuestro ejemplo estamos abriendo $nombre_archivo en modo de adicion. + // El apuntador de archivo se encuentra al final del archivo, asi que + // alli es donde ira $contenido cuando llamemos fwrite(). + if (!$gestor = fopen($nombre_archivo, 'a')) { + echo "No se puede abrir el archivo ($nombre_archivo)"; + exit; + } + + // Escribir $contenido a nuestro arcivo abierto. + if (fwrite($gestor, $contenido) === FALSE) { + echo "No se puede escribir al archivo ($nombre_archivo)"; + exit; + } + + echo "Éxito, se escribió ($contenido) al archivo ($nombre_archivo)"; + + fclose($gestor); + +} else { + echo "No se puede escribir sobre el archivo $nombre_archivo"; +} +?> +]]> + </programlisting> + </example> + </para> <simpara> - Ver también <function>fread</function>, <function>fopen</function>, - <function>fsockopen</function>, <function>popen</function>, y - <function>fputs</function>. + Vea también <function>fread</function>, + <function>fopen</function>, <function>fsockopen</function>, and + <function>popen</function>. </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-es/reference/zip/reference.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-es/reference/zip/reference.xml diff -u phpdoc-es/reference/zip/reference.xml:1.2 phpdoc-es/reference/zip/reference.xml:1.3 --- phpdoc-es/reference/zip/reference.xml:1.2 Tue Jan 20 22:34:40 2004 +++ phpdoc-es/reference/zip/reference.xml Tue Jun 15 22:34:07 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- EN-Revision: 1.5 Maintainer: javi Status: ready --> <reference id="ref.zip"> <title>Funciones de manejo de archivos Zip (sólo @@ -19,12 +19,12 @@ &reftitle.required; <para> Este módulo utiliza las funciones de la - librería <ulink url="&url.zziplib;">ZZIPlib</ulink>, + biblioteca <ulink url="&url.zziplib;">ZZIPlib</ulink>, creada por Guido Draheim. Se requiere una versión de ZZIPlib >= 0.10.6. </para> <para> - Debe tenerse en cuenta que la anterior librería solamente + Debe tenerse en cuenta que la anterior biblioteca solamente proporciona un conjunto limitado de funciones para el tratamiento de archivos en formato Zip. Para poder crear los archivos en formato Zip se requiere del uso de alguna herramienta externa a http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-internal-subset.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-internal-subset.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-internal-subset.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-internal-subset'> <refnamediv> <refname>DomDocumentType->internal_subset</refname> <refpurpose> Devuelve el sub-conjunto interno </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomDocumentType->internal_subset</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-name.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-name.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-name'> <refnamediv> <refname>DomDocumentType->name</refname> <refpurpose> Devuelve el nombre del tipo de documento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomDocumentType->name</methodname> <void/> </methodsynopsis> <para> Esta función devuelve el nombre del tipo de documento. </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-notations.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-notations.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-notations.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-notations'> <refnamediv> <refname>DomDocumentType->notations</refname> <refpurpose> Devuelve una lista de notaciones </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>array</type><methodname>DomDocumentType->notations</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-public-id.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-public-id.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-public-id.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-public-id'> <refnamediv> <refname>DomDocumentType->public_id</refname> <refpurpose> Devuelve el id público del tipo de documento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomDocumentType->public_id</methodname> <void/> </methodsynopsis> <para> Esta función devuelve el id público del tipo de documento. </para> <para> El siguiente ejemplo no produce ninguna salida. <example> <title>Recuperación del id público</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error al analizar el documento\n"; exit; } $tipo_doc = $dom->doctype(); echo $tipo_doc->public_id(); ?> ]]> </programlisting> </example> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomDocumentType-system-id.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomDocumentType-system-id.xml +++ phpdoc-es/reference/domxml/functions/DomDocumentType-system-id.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domdocumenttype-system-id'> <refnamediv> <refname>DomDocumentType->system_id</refname> <refpurpose> Devuelve el id de sistema del tipo de documento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomDocumentType->system_id</methodname> <void/> </methodsynopsis> <para> Devuelve el id de sistema del tipo de documento. </para> <para> El siguiente ejemplo imprime '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'. <example> <title>Recuperación del id de sistema</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error mientras se analizaba el documento\n"; exit; } $tipo_doc = $dom->doctype(); echo $tipo_doc->system_id(); ?> ]]> </programlisting> </example> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-get-attribute-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-get-attribute-node.xml +++ phpdoc-es/reference/domxml/functions/DomElement-get-attribute-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.27 --> <refentry id='function.domelement-get-attribute-node'> <refnamediv> <refname>DomElement->get_attribute_node</refname> <refpurpose> Devuelve el valor del atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomElement->get_attribute_node</methodname> <methodparam><type>object</type><parameter>atr</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-get-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-get-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-get-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.28 --> <refentry id='function.domelement-get-attribute'> <refnamediv> <refname>DomElement->get_attribute</refname> <refpurpose> Devuelve el valor del atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomElement->get_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> Devuelve el atributo con nombre <parameter>nombre</parameter> del nodo actual. </para> <para> (Sólo PHP >= 4.3) Si no se encuentra un atributo con el nombre dado, se devuelve una cadena vacía. </para> <para> Vea también <function>domelement_set_attribute</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-get-elements-by-tagname.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-get-elements-by-tagname.xml +++ phpdoc-es/reference/domxml/functions/DomElement-get-elements-by-tagname.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.7 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domelement-get-elements-by-tagname'> <refnamediv> <refname>DomElement->get_elements_by_tagname</refname> <refpurpose> Obtiene elementos por el nombre de etiqueta </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->get_elements_by_tagname</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> Esta función devuelve una matriz con todos los elementos que tienen <parameter>nombre</parameter> como su nombre de etiqueta. Cada elemento de la matriz es de tipo DomElement. </para> <para> <example> <title>Obtener el contenido</title> <programlisting role="php"> <![CDATA[ <?php if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error al analizar el documento\n"; exit; } $raiz = $dom->document_element(); $matriz_nodos = $raiz->get_elements_by_tagname("element"); for ($i = 0; $i<count($matriz_nodos); $i++) { $nodo = $matriz_nodos[$i]; echo "El elemento[$i] es: " . $nodo->get_content(); } ?> ]]> </programlisting> </example> </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-has-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-has-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-has-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domelement-has-attribute'> <refnamediv> <refname>DomElement->has_attribute</refname> <refpurpose> Verifica si un atributo existe </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->has_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-remove-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-remove-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-remove-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domelement-remove-attribute'> <refnamediv> <refname>DomElement->remove_attribute</refname> <refpurpose> Elimina un atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->remove_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-set-attribute-node.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-set-attribute-node.xml +++ phpdoc-es/reference/domxml/functions/DomElement-set-attribute-node.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <!-- This function is not implemented at all for the time being <refentry id='function.domelement-set-attribute-node'> <refnamediv> <refname>DomElement->set_attribute_node</refname> <refpurpose> Agrega un nuevo atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->set_attribute_node</methodname> <methodparam><type>object</type><parameter>atr</parameter></methodparam> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-set-attribute.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-set-attribute.xml +++ phpdoc-es/reference/domxml/functions/DomElement-set-attribute.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.27 --> <refentry id='function.domelement-set-attribute'> <refnamediv> <refname>DomElement->set_attribute</refname> <refpurpose> Agrega un nuevo atributo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomElement->set_attribute</methodname> <methodparam><type>string</type><parameter>nombre</parameter></methodparam> <methodparam><type>string</type><parameter>valor</parameter></methodparam> </methodsynopsis> <para> Define un antributo con el nombre <parameter>nombre</parameter> con el valor dado. Si el atributo no existe, será creado. </para> <para> <example> <title>Definición de un atributo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo_nuevo = $doc->append_child($nodo); $nodo_nuevo->set_attribute("align", "left"); ?> ]]> </programlisting> </example> </para> <para> Vea también <function>domelement_get_attribute</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomElement-tagname.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomElement-tagname.xml +++ phpdoc-es/reference/domxml/functions/DomElement-tagname.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.6 --> <refentry id='function.domelement-tagname'> <refnamediv> <refname>DomElement->tagname</refname> <refpurpose> Devuelve el nombre del elemento </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>string</type><methodname>DomElement->tagname</methodname> <void/> </methodsynopsis> <para> &warn.undocumented.func; </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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-add-namespace.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-add-namespace.xml +++ phpdoc-es/reference/domxml/functions/DomNode-add-namespace.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.38 --> <refentry id='function.domnode-add-namespace'> <refnamediv> <refname>DomNode->add_namespace</refname> <refpurpose> Agrega una declaración de espacio de nombres a un nodo. </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>bool</type><methodname>DomNode->add_namespace</methodname> <methodparam><type>string</type><parameter>uri</parameter></methodparam> <methodparam><type>string</type><parameter>prefijo</parameter></methodparam> </methodsynopsis> <para> </para> <para> Vea también <function>domdocument_create_element_ns</function>, y <function>domnode_set_namespace</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-append-child.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-append-child.xml +++ phpdoc-es/reference/domxml/functions/DomNode-append-child.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: lboshell Status: ready --> <!-- splitted from ./en/functions/domxml.xml, last change in rev 1.40 --> <refentry id='function.domnode-append-child'> <refnamediv> <refname>DomNode->append_child</refname> <refpurpose> Agrega un nuevo hijo al final del grupo de hijos </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomNode->append_child</methodname> <methodparam><type>object</type><parameter>nodo_nuevo</parameter></methodparam> </methodsynopsis> <para> Esta función agrega un hijo a una lista existente de hijos o crea una nueva lista de hijos. El hijo puede ser creado, por ejemplo, con <function>domdocument_create_element</function>, <function>domdocument_create_text</function> etc. o simplemente mediante el uso de otro nodo. </para> <para> (PHP < 4.3) Antes de que un nuevo hijo sea agregado, éste es duplicado. Por lo tanto el nuevo hijo es una nueva copia que puede ser modificada sin cambiar el nodo que fue pasado a esta función. Si el nodo pasado tiene hijos, ellos serán duplicados también, lo que facilita la duplicación de grandes segmentos de un documento XML. El valor de retorno es el hijo agregado. Si planea realizar modificaciones posteriores sobre el hijo agregado, debe usar el nodo devuelto. </para> <para> (PHP 4.3.0/4.3.1) El nuevo hijo <parameter>nodo_nuevo</parameter> es enlazado primero desde su contexto actual, si ya se trata de un hijo de DomNode. Por lo tanto el nodo es movido y no una copia del nodo. </para> <para> (PHP >= 4.3.2) El nuevo hijo <parameter>nodo_nuevo</parameter> es primera separado de su contexto actual, si éste ya existe en el árbol. Por lo tanto el nodo es movido y no copiado. Este debe ser su comportamiento de acuerdo a las especificaciones del W3C. Si desea duplicar segmentos grandes de un documento XML, use DomNode->clone_node() antes de agregar. </para> <para> El siguiente ejemplo agrega un nuevo nodo tipo elemento a un documento nuevo y define el atributo "align" como "left". <example> <title>Agregar un hijo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo_nuevo = $doc->append_child($nodo); $nodo_nuevo->set_attribute("align", "left"); ?> ]]> </programlisting> </example> El anterior ejemplo pudo ser escrito también como: <example> <title>Agregar un hijo</title> <programlisting role="php"> <![CDATA[ <?php $doc = domxml_new_doc("1.0"); $nodo = $doc->create_element("para"); $nodo->set_attribute("align", "left"); $nodo_nuevo = $doc->append_child($nodo); ?> ]]> </programlisting> </example> Un ejemplo más complejo se presenta a continuación. Primero busca cierto elemento, lo duplica incluyendo sus hijos y lo agrega como un hermano. Finalmente un nuevo atributo es agregado a uno de los hijos del nuevo hermano y el documento completo es volcado. <example> <title>Agregar un hijo</title> <programlisting role="php"> <![CDATA[ <?php include("ejemplo.inc"); if (!$dom = domxml_open_mem($cadena_xml)) { echo "Ocurrió un error al analizar el documento\n"; exit; } $elementos = $dom->get_elements_by_tagname("informaltable"); print_r($elementos); $elemento = $elementos[0]; $padre = $elemento->parent_node(); $nodo_nuevo = $padre->append_child($elemento); $hijos = $nodo_nuevo->children(); $atr = $hijos[1]->set_attribute("align", "left"); echo "<pre>"; $archivo_xml = $dom->dump_mem(); echo htmlentities($archivo_xml); echo "</pre>"; ?> ]]> </programlisting> </example> El ejemplo anterior pudo crearse también con <function>domnode_insert_before</function> en lugar de <function>domnode_append_child</function>. </para> <para> Vea también <function>domnode_insert_before</function>, y <function>domnode_clone_node</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 --> http://cvs.php.net/co.php/phpdoc-es/reference/domxml/functions/DomNode-append-sibling.xml?r=1.1&p=1 Index: phpdoc-es/reference/domxml/functions/DomNode-append-sibling.xml +++ phpdoc-es/reference/domxml/functions/DomNode-append-sibling.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.5 Maintainer: lboshell Status: ready --> <refentry id='function.domnode-append-sibling'> <refnamediv> <refname>DomNode->append_sibling</refname> <refpurpose> Agrega un nuevo hermano a un nodo </refpurpose> </refnamediv> <refsect1> <title>Descripción</title> <methodsynopsis> <type>object</type><methodname>DomNode->append_sibling</methodname> <methodparam><type>object</type><parameter>nodo_nuevo</parameter></methodparam> </methodsynopsis> <para> Esta función agrega un hermano a un nodo existente. El hijo puede ser creado, por ejemplo, con <function>domdocument_create_element</function>, <function>domdocument_create_text</function> etc. o simplemente mediante el uso de otro nodo. </para> <para> Antes de que un nuevo hermano sea agregado, éste es duplicado. Por lo tanto, el nuevo hijo es una copia completamente nueva que puede modificarse sin cambiar el nodo que fue pasado a ésta función. Si el nodo pasado tiene hijos, ellos serán duplicados también, lo que facilita enormemente la duplicación de partes grandes de un documento XML. El valor de retorno es el hermano agregado. Si planea hacer modificaciones posteriores al hermano agregado, debe usar el nodo devuelto. </para> <para> Esta función ha sido agregada para ofrecer el comportamiento de <function>domnode_append_child</function>, del modo que funcionaba hasta PHP 4.2. </para> <para> Vea también <function>domnode_append_before</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 -->