<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://php.apsique.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Php y otras yerbas - Sesiones y XML - Comentarios</title>
 <link>http://php.apsique.com/contenido/curso_php_iv</link>
 <description>Comentarios para &quot;Sesiones y XML&quot;</description>
 <language>es</language>
<item>
 <title>Hola a todos.
Estoy</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-70564</link>
 <description>&lt;p&gt;Hola a todos.&lt;br /&gt;
Estoy iniciando en la programacion de PHP por medio de Clases, y he abierto paginas php a atraves de la tecnologia Ajax (sin tener que recargar toda la pagina) sin embargo la funcion que utiliz Ajax.open, exige una ruta url. En este caso me gustaria utilizar las funciones de la clase (que se encuentran en la pagina) para obtener los resultados. ¿Es posible utilizar ajax para obtener info. de una clase, es decir pasarle el objeto-&amp;gt;funcion al ajax en lugar de utilizra una url?&lt;br /&gt;
Gracias&lt;/p&gt;
</description>
 <pubDate>Fri, 12 Oct 2007 18:36:52 -0700</pubDate>
 <dc:creator>Perejilillo desconocido</dc:creator>
 <guid isPermaLink="false">comment 70564 at http://php.apsique.com</guid>
</item>
<item>
 <title>hola a todos es la primera ve</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-47992</link>
 <description>&lt;p&gt;hola a todos es la primera vez que voy a utilizar php en dreamweaber en el editor de home site y no se como definir que quiero hacer un nuevo documento pero php por favor diganme como hacer paginas utilizando php y como es que se mandan llamar para que se ejecuten porque cuando inteno ejecutar alguna no me la muestra como pagina de internet&lt;br /&gt;
auxilio!!!!!!&lt;/p&gt;
</description>
 <pubDate>Wed, 27 Sep 2006 07:30:13 -0700</pubDate>
 <dc:creator>Iliana</dc:creator>
 <guid isPermaLink="false">comment 47992 at http://php.apsique.com</guid>
</item>
<item>
 <title>hola estoy desesperada nunca</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-47991</link>
 <description>&lt;p&gt;hola estoy desesperada nunca he usado php y ahora en mi primer trabajo me piden hacer paginas utilizando php en el editor de dreamweaver en home site y no se ni por donde empezar.&lt;br /&gt;
quisiera saber como es que se mandan llamar las paginas con la extension .php porque no se&lt;br /&gt;
porfavor ayudenme&lt;/p&gt;
</description>
 <pubDate>Wed, 27 Sep 2006 07:24:59 -0700</pubDate>
 <dc:creator>Oliva25</dc:creator>
 <guid isPermaLink="false">comment 47991 at http://php.apsique.com</guid>
</item>
<item>
 <title>hola hola
tengo un problema</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-47924</link>
 <description>&lt;p&gt;hola hola&lt;br /&gt;
tengo un problema con las sesiones en mi pagina, ya configure el archivo php.ini poniendo la direccion correspondiente y no funciono asi k me recomendaron poner el siguiente codigo al principio de la pagina&lt;br /&gt;
&amp;lt;?php session_save_path(&quot;c:/winnt/temp &quot;);&lt;br /&gt;
y al intentar iniciar sesin me marca estos errores&lt;/p&gt;
&lt;p&gt;Warning: open(c:/winnt/temp \sess_b0b9befa67d49803313c456843b07b02, O_RDWR) failed: m (2) in c:\inetpub\wwwroot\bancomext.pachuca\login2.php on line 2&lt;/p&gt;
&lt;p&gt;Warning: open(c:/winnt/temp \sess_b0b9befa67d49803313c456843b07b02, O_RDWR) failed: m (2) in Unknown on line 0&lt;/p&gt;
&lt;p&gt;Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:/winnt/temp ) in Unknown on line 0&lt;br /&gt;
alguien me puede ayudar porfabor!!!!!!&lt;/p&gt;
</description>
 <pubDate>Thu, 24 Aug 2006 15:17:13 -0700</pubDate>
 <dc:creator>akima</dc:creator>
 <guid isPermaLink="false">comment 47924 at http://php.apsique.com</guid>
</item>
<item>
 <title>Hola a todos..

Alguien pod</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-34122</link>
 <description>&lt;p&gt;Hola a todos..&lt;/p&gt;
&lt;p&gt;Alguien podria por favor ayudarme, estoy desesperada, necesito realizar una consulta de un documento xml utilizando PHP, utilice el ejemplo pero me sale un error en la linea con la sentencia:&lt;br /&gt;
Define tu consulta: &lt;code&gt;&quot;&amp;gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Y el error dice que el index consulta no esta definida o algo asi, especificamente el error esta en: $HTTP_GET_VARS[&quot;consulta&quot;] porque en lugar de eso le cambio por &quot;&quot; y no sale el error.. &lt;/p&gt;
&lt;p&gt;Porfa ayudenme..&lt;/p&gt;
&lt;p&gt;Gracias.&lt;/p&gt;
&lt;p&gt;F. Desesperada&lt;/p&gt;
</description>
 <pubDate>Thu, 06 Apr 2006 08:55:54 -0700</pubDate>
 <dc:creator>desesperada</dc:creator>
 <guid isPermaLink="false">comment 34122 at http://php.apsique.com</guid>
</item>
<item>
 <title>Ups con XML</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-13340</link>
 <description>&lt;p&gt;Ups, disculpa.&lt;br /&gt;
Debe decir&lt;/p&gt;
&lt;p&gt;&lt;code&gt;define (&quot;XML&quot;,&quot;ejemplo.xml&quot;)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;no&lt;/p&gt;
&lt;p&gt;&lt;code&gt;define (XML,&quot;ejemplo.xml&quot;)&lt;/code&gt;&lt;/p&gt;
</description>
 <pubDate>Fri, 07 Oct 2005 11:00:11 -0700</pubDate>
 <dc:creator>clbustos</dc:creator>
 <guid isPermaLink="false">comment 13340 at http://php.apsique.com</guid>
</item>
<item>
 <title>Muestra Error al instanciar el xml</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-13338</link>
 <description>&lt;p&gt;Muy Buenas, Me muestra el siguiente error en la linea 18&lt;/p&gt;
&lt;p&gt;Notice: Use of undefined constant XML - assumed &#039;XML&#039; in D:\wwwroot\eparcel\admin\probar\cdata.php on line 18&lt;/p&gt;
&lt;p&gt;es en la sentencia    define (XML,&quot;ejemplo.xml&quot;); &lt;/p&gt;
&lt;p&gt;Por favor ayudenme con este error necesito ller un arcuivo XML con caracteres especiales del CDATA&lt;/p&gt;
&lt;p&gt;Esperando Pronta syuda &lt;/p&gt;
&lt;p&gt;Muchas Gracias.&lt;/p&gt;
&lt;p&gt;Saludos Cordiales.&lt;/p&gt;
</description>
 <pubDate>Fri, 07 Oct 2005 09:15:12 -0700</pubDate>
 <dc:creator>Freddy</dc:creator>
 <guid isPermaLink="false">comment 13338 at http://php.apsique.com</guid>
</item>
<item>
 <title>Ejemplo de uso de Xpath</title>
 <link>http://php.apsique.com/contenido/curso_php_iv#comment-770</link>
 <description>&lt;p&gt;.nodo {&lt;br /&gt;
    border:1px solid black;&lt;br /&gt;
    background:#eee;&lt;br /&gt;
    margin:3px;&lt;br /&gt;
    padding:5px;&lt;br /&gt;
}&lt;br /&gt;
Para más información sobre este ejemplo, dirigirse a &lt;a href=&#039;http://apsique.virtuabyte.cl/php/node/21&#039;&gt;Curso de PHP, par&lt;/p&gt;
</description>
 <pubDate>Mon, 14 Feb 2005 18:53:41 -0800</pubDate>
 <dc:creator>Php y otras yerbas, por Clbustos (trackback)</dc:creator>
 <guid isPermaLink="false">comment 770 at http://php.apsique.com</guid>
</item>
<item>
 <title>Sesiones y XML</title>
 <link>http://php.apsique.com/contenido/curso_php_iv</link>
 <description>&lt;UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo0&quot;&gt;1.- Sesiones&lt;/A&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo1&quot;&gt;1.1.- &amp;iquest;Qué son las sesiones?&lt;/A&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo2&quot;&gt;1.2.- &amp;iquest;Ahora, cómo se utilizan?&lt;/A&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo3&quot;&gt;1.2.1.- Configuración de php.ini&lt;/A&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo4&quot;&gt;1.2.2.- Funcionalidad básica&lt;/A&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo5&quot;&gt;1.2.3.- Ejemplo de registro de usuario&lt;/A&gt;&lt;/UL&gt;
&lt;/UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo6&quot;&gt;2.- PHP y XML&lt;/A&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo7&quot;&gt;2.1.- &amp;iquest;Qué es XML?&lt;/A&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo8&quot;&gt;2.2.- Formas de procesar XML&lt;/A&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo9&quot;&gt;2.2.1.- SAX&lt;/A&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo10&quot;&gt;2.2.2.- DOM&lt;/A&gt;&lt;/UL&gt;
&lt;LI&gt;&lt;A HREF=&quot;#titulo11&quot;&gt;2.3.- PHP y XML vía DOM&lt;/A&gt;&lt;/UL&gt;
&lt;/UL&gt;
&lt;!--break--&gt;
&lt;!--Fin indice--&gt;
&lt;h2&gt;&lt;A NAME=&quot;titulo0&quot;&gt;&lt;/A&gt;1.- Sesiones&lt;/h2&gt;
&lt;h3&gt;&lt;A NAME=&quot;titulo1&quot;&gt;&lt;/A&gt;1.1.- &amp;iquest;Qué son las sesiones?&lt;/h3&gt;
&lt;p&gt;De acuerdo al manual de PHP:&lt;/p&gt;
&lt;p&gt;Las sesiones en PHP constituyen el método para preservar ciertos datos a los largo de accesos sucesivos.&lt;/p&gt;
&lt;p&gt;A cada visitante le es asignado un id único, llamado id de sesión. Este id es guardado en un cookie en el lado del cliente o se propaga en la URL.&lt;/p&gt;
&lt;p&gt;El soporte de sesiones permite registrar un número arbitrario de variables que se preservan a lo largo de sucesivas peticiones. Cuando un visitante accede al sitio, PHP le asigna automáticamente (si session.auto_start esta en 1) o a petición (a través de la instrucción &lt;strong&gt;session_start()&lt;/strong&gt; o implícitamente a través de &lt;strong&gt;session_register()&lt;/strong&gt;). &lt;/p&gt;
&lt;h3&gt;&lt;A NAME=&quot;titulo2&quot;&gt;&lt;/A&gt;1.2.- &amp;iquest;Ahora, cómo se utilizan?&lt;/h3&gt;
&lt;h4&gt;&lt;A NAME=&quot;titulo3&quot;&gt;&lt;/A&gt;1.2.1.- Configuración de php.ini&lt;/h4&gt;
&lt;p&gt;La verdad, el uso de sesiones es muy sencillo. El principal problema radica en la configuración del php.ini.&lt;/p&gt;
&lt;p&gt;Como ya se ha señalado, el id de la sesión se almacena en el cliente; ahora, el contenido de las variables debe guardarse en el lado del servidor. El método por defecto es almacenarlas en un archivo, aunque si así se desea, se puede usar otro método, como almacenarlas las sesiones en base de datos.&lt;/p&gt;
&lt;p&gt;Entonces, se debe definir en que parte del servidor almacenaremos las sesiones. Por defecto, la configuración de php tiene el path /tmp, que es válido para linux, pero no para windows. Entonces, deberemos configurar el php.ini para que apunte a un directorio definido por nosotros; uno adecuado sería el directorio de temporales de windows.&lt;/p&gt;
&lt;p&gt;Para Windows 95 y derivados&lt;/p&gt;
&lt;p class=&quot;codigo&quot;&gt;session.save_path = c:/windows/temp&lt;/p&gt;
&lt;p&gt;para Windows NT y derivados&lt;/p&gt;
&lt;p class=&quot;codigo&quot;&gt;session.save_path = c:/winnt/temp&lt;/p&gt;
&lt;h4&gt;&lt;A NAME=&quot;titulo4&quot;&gt;&lt;/A&gt;1.2.2.- Funcionalidad básica&lt;/h4&gt;
&lt;p&gt;Un ejemplo sencillo de trabajo con sesiones sería el siguiente&lt;/p&gt;
&lt;div class=&#039;code&#039;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span class=&quot;hl-inlinetags&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;session_start&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; Use $HTTP_SESSION_VARS with PHP 4.0.6 or less&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_SESSION_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_SESSION_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_SESSION_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;++;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;Esta es la vez número &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_SESSION_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt; que accedes a esta página&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_SESSION_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &amp;gt; &lt;/span&gt;&lt;span class=&quot;hl-number&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;br&amp;gt;&amp;amp;iquest;No crees que está bueno, ya?&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;  &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Como vemos, se inicia la sesión con la instrucción &lt;strong&gt;session_start()&lt;/strong&gt;. Para escribir o recoger una variable, se debe usar el array &lt;strong&gt;$HTTP_SESSION_VARS&lt;/strong&gt; si estamos en una versión de PHP inferior a 4.0.6 o &lt;strong&gt;$_SESSION&lt;/strong&gt;, en una superior.Si ocupamos la primera forma, debemos tener cuidado de registrar la variable como global si la utilizamos dentro de una función.&lt;/p&gt;
&lt;p&gt;En nuestro ejemplo, la variable es &lt;strong&gt;$HTTP_SESSION_VARS[&#039;count&#039;]&lt;/strong&gt;, la cual incrementamos cada vez que se entra a la página. Incluso, si cambiamos a otra página y volvemos a esta, la variable se mantendrá, mientras mantengamos el &lt;strong&gt;session_start()&lt;/strong&gt; al inicio.&lt;/p&gt;
&lt;p class=&quot;codigo&quot;&gt;Nota: Puede que la sesión se mantenga aunque se acceda a una página intermedia. Esto, si se utiliza el método de registro de id por cookies.&lt;/p&gt;
&lt;h4&gt;&lt;A NAME=&quot;titulo5&quot;&gt;&lt;/A&gt;1.2.3.- Ejemplo de registro de usuario&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Archivo: registro_usuario.php&lt;/p&gt;
&lt;div class=&#039;code&#039;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span class=&quot;hl-inlinetags&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;include_once&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;HTML/Template/IT.php&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;session_start&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;HTML_Template_IT&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;loadTemplateFile&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;registro_usuario.html&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$login&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &amp;amp;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_SESSION_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;login&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;usuario&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$login&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;usuario&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;logout&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;touchBlock&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;logout&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;session_unset&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;session_destroy&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;elseif&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$login&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;touchBlock&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;registro&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;setCurrentBlock&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;registrado&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;setVariable&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;LOGIN&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$login&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;parseCurrentBlock&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$tpl&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;b&gt;HTML&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Archivo: registro_usuario.html&lt;/p&gt;
&lt;div class=&#039;code&#039;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;DOCTYPE&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;HTML&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;PUBLIC&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;-//W3C//DTD HTML 4.0 Transitional//EN&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;HTML&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;HEAD&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;personas1.css&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;stylesheet&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;text/css&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;TITLE&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; Registro de usuario&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;TITLE&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;META&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;NAME&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;Generator&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;CONTENT&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;EditPlus&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;META&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;NAME&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;Author&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;CONTENT&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;META&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;NAME&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;Keywords&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;CONTENT&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;META&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;NAME&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;CONTENT&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;HEAD&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;BODY&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Registro de usuario&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; BEGIN registro &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;FORM&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;METHOD&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;GET&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;ACTION&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Login: &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;INPUT&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;TYPE&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;NAME&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;usuario&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;INPUT&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;TYPE&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;submit&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;FORM&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; END registro &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; BEGIN logout &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Usted ha salido exitosamente del sistema&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;registro_usuario.php&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Presione aquí para volver&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; END logout &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; BEGIN registrado &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Bienvenido, usuario {LOGIN}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;registro_usuario.php?logout=1&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Logout&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; END registrado &lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;--&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;BODY&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;HTML&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Como se ve, se ingresa la variable &lt;strong&gt;usuario&lt;/strong&gt; enviada por el formulario a la variable de sesión &lt;strong&gt;$login&lt;/strong&gt;, referencia a la variable de sesión &lt;strong&gt;$HTTP_SESSION_VARS[&#039;login&#039;]&lt;/strong&gt;. Si se envía por GET la variable logout, destruimos la sesión.&lt;/p&gt;
&lt;h2&gt;&lt;A NAME=&quot;titulo6&quot;&gt;&lt;/A&gt;2.- PHP y XML&lt;/h2&gt;
&lt;h3&gt;&lt;A NAME=&quot;titulo7&quot;&gt;&lt;/A&gt;2.1.- &amp;iquest;Qué es XML?&lt;/h3&gt;
&lt;p&gt; Según la definición de W3C (la compañía encargada de crear los estándares para Internet):&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;Los documentos XML están compuestos de unidades de almacenamiento, denominadas entidades, que contienen datos datos procesados y no procesados. Los datos procesados están compuestos de caractéres, algunos de los cuales constituyen datos de caracteres, en tanto que otros conforman marcado. El marcado describe la estructura lógica y de almacenamiento. XML provee de mecanismos para imponer restricciones a la estructura lógica y de almacenamiento.&lt;/p&gt;
&lt;p&gt;Un módulo de software llamado procesador de XML es usado para leer documentos XML y proveer acceso a su contenido y estructura. Se asume que el procesador XML trabaja para una aplicación. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;En términos simples, un documento XML es similar a uno HTML, sólo que los tag utilizados pueden ser elegidos libremente, con algunas restricciones en relación al HTML.&lt;/p&gt;
&lt;p&gt;Ejemplo de documento XML&lt;/p&gt;
&lt;div class=&#039;code&#039;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&#039;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&#039; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&#039;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;ISO-8859-1&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;empresas&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;empresa&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;nombre&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Salmones Inc.&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;nombre&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;rubro&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Alimentación&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;rubro&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;telefono&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;222222&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;telefono&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursales&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursal&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;san_pedro&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;San Pedro&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursal&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursal&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;concepcion&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Concepcion&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursal&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursal&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;buenos_aires&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Buenos Aires&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursal&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursales&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;empresa&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;empresa&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;nombre&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Computadores S.A.&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;nombre&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;rubro&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;Computación&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;rubro&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;telefono&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;33333&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;telefono&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;sucursales&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;empresa&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;empresas&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Como se ve, la sintaxis es muy similar a la de HTML. Debe destacarse el uso de la cabecera, la cual señala que la versión de XML a utilizar es la 1 (la única existente, hasta el momento), y el tipo de codificación de carácteres (en nuestro caso, la ISO-8859-1, ampliamente utilizada)&lt;/p&gt;
&lt;p&gt;Cabe notar que en un documento XML todos los tags deben cerrarse y, si se define cual es su estructura a través de un documento DTD, deben encontrarse todos los tags que en el se especifican. Por ello, en la empresa de computación hemos debido incluir el tag de sucursales, aunque no contenga nada. La notación &lt;tag /&gt; es una abreviación de &lt;tag&gt;&lt;/tag&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;A NAME=&quot;titulo8&quot;&gt;&lt;/A&gt;2.2.- Formas de procesar XML&lt;/h3&gt;
&lt;p&gt;Los procesadores XML se dividen en dos tipos: SAX y DOM.&lt;/p&gt;
&lt;h4&gt;&lt;A NAME=&quot;titulo9&quot;&gt;&lt;/A&gt;2.2.1.- SAX&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;files/sax.gif&quot; width=&quot;400&quot; height=&quot;195&quot;&gt;&lt;/p&gt;
&lt;p&gt;Los procesadores SAX navegan en forma secuencial a través del archivo, generando callbacks a funciones determinadas por el desarrollador ante cada evento, como la apertura de un tag o su cierre. Su ventaja es que ocupan muy poca memoria y son muy rápidos. La desventaja es que todo el trabajo de determinar la estructura del archivo (ver que tag se incluye dentro de otro), corre por cuenta del desarrollador.&lt;/p&gt;
&lt;h4&gt;&lt;A NAME=&quot;titulo10&quot;&gt;&lt;/A&gt;2.2.2.- DOM&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;files/dom.gif&quot; width=&quot;400&quot; height=&quot;234&quot;&gt;&lt;/p&gt;
&lt;p&gt;Los procesadores DOM, en cambio, guardan toda la información de estructura y contenido en memoria. Su ventaja es que es muy fácil navegar a través del XML, subiendo o bajando a través de los nodos, pudiendo recopilar información de muchos tag en una sola instrucción. El problema radica en que son más lentos y que, dependiendo del tamaño del documento, almacenar la estructura completa puede requerir mucha memoria.&lt;/p&gt;
&lt;h3&gt;&lt;A NAME=&quot;titulo11&quot;&gt;&lt;/A&gt;2.3.- PHP y XML vía DOM&lt;/h3&gt;
&lt;p&gt;Para nuestro curso, utilizaremos el método DOM para navegar a través de nuestro documento XML. Para ello, utilizaremos la librería Php-Xpath, la cual se puede obtener en &lt;a href=&quot;http://sourceforge.net/projects/phpxpath/&quot;&gt;http://sourceforge.net/projects/phpxpath/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Esta librería utiliza el lenguaje Xpath para acceder al archivo XML, el cual representa al documento Xml como una estructura de archivos, siendo cada tag un &#039;archivo&#039; dentro del sistema. Entre las querys más comunes tenemos&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;//empresa: Devuelve todos los tag con nombre empresa&lt;/li&gt;
&lt;li&gt;/empresas[1]/empresa[1]: Devuelve el primer tag empresa que se encuentra dentro del primer tag empresas&lt;/li&gt;
&lt;li&gt;//sucursal[@id=&quot;san_pedro&quot;] : Devuelve el o los tag sucursal que tengan como un atributo &lt;strong&gt;id&lt;/strong&gt; igual a &quot;san_pedro&quot;&lt;/li&gt;
&lt;li&gt;/empresas/*: Devuelve todos los tag que son hijos de empresas&lt;/li&gt;
&lt;li&gt;//rubro | //telefono: Devuelte todos los tag rubro, más los telefono&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Para probar el uso de Xpath, podemos utilizar el siguiente código, que tras una consulta, nos muestra los tags o nodos encontrados, sus atributos y cdata. El archivo XML a utilizar será el mismo que utilizamos de ejemplo, &lt;strong&gt;empresas.xml&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;Pueden encontrar este script en línea &lt;a href=&quot;node/380&quot;&gt;aquí&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Archivo: xml.php &lt;/p&gt;
&lt;div class=&#039;code&#039;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span class=&quot;hl-code&quot;&gt;&amp;lt;html&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;head&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;style&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;.nodo {&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    border:1px solid black;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    background:#eee;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    margin:3px; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;    padding:5px;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;/style&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;/head&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;body&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;El documento XML es:&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;div style=&#039;border:1px solid black; padding:5px&#039;&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt; MUESTRO EL DOCUMENTO EN PANTALLA&lt;/span&gt;&lt;span class=&quot;hl-comment&quot;&gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$file_xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;ejemplo.xml&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$fuente&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$file_xml&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$fuente&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$linea&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;htmlentities&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$linea&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;FORM METHOD=GET ACTION=&amp;quot;&amp;quot;&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Define tu consulta:&amp;lt;INPUT TYPE=&amp;quot;text&amp;quot; NAME=&amp;quot;consulta&amp;quot; VALUE=&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;consulta&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&amp;quot;&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;lt;/FORM&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;include&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;XPath.class.php&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&#039;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;XPath&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;importFromFile&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$file_xml&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;consulta&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$consulta&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$HTTP_GET_VARS&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;consulta&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodos&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$consulta&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;Tu consulta fue: &amp;lt;b&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$consulta&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodos&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;Tu consulta fue exitosa y arrojo los siguiente nodos:&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodos&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodo&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;div class=&#039;nodo&#039;&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;Path:&amp;lt;b&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodo&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$cdata&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;trim&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;getData&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodo&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$cdata&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;Cdata:&amp;lt;b&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;getData&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodo&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;No tiene Cdata&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$atributos&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$xml&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-identifier&quot;&gt;getAttributes&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nodo&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$atributos&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;Se encontraron los siguientes atributos:&amp;lt;/p&amp;gt;&amp;lt;ul&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$atributos&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nombre&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; =&amp;gt; &lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$valor&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                    &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$nombre&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;hl-var&quot;&gt;$valor&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;                &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;p&amp;gt;No tiene atributos&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;            &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;        &lt;/span&gt;&lt;span class=&quot;hl-reserved&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt; &lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-string&quot;&gt;No se obtuvieron nodos&lt;/span&gt;&lt;span class=&quot;hl-quotes&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-brackets&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;hl-code&quot;&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hl-inlinetags&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <comments>http://php.apsique.com/contenido/curso_php_iv#comments</comments>
 <category domain="http://php.apsique.com/lenguajes/php/curso_avanzado">Curso de Php Avanzado</category>
 <pubDate>Wed, 07 Jan 2004 21:25:25 -0800</pubDate>
 <dc:creator>admin</dc:creator>
 <guid isPermaLink="false">21 at http://php.apsique.com</guid>
</item>
</channel>
</rss>
