mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 00:12:06 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@305804 c90b9560-bf6c-de11-be94-00142212c4b1
90 lines
2.1 KiB
XML
90 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: e551bed23bf14a37ff862a7507af0e6671326252 Maintainer: agarzon Status: ready -->
|
|
<refentry xml:id="simplexmlelement.getname" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>SimpleXMLElement::getName</refname>
|
|
<refpurpose>Retorna el nombre del elemento XML</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>string</type><methodname>SimpleXMLElement::getName</methodname>
|
|
<void/>
|
|
</methodsynopsis> <para>
|
|
Retorna el nombre del elemento XML.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
El método <literal>getName</literal> retorna como <type>string</type> el
|
|
nombre de la etiqueta XML referenciada por el objeto SimpleXMLElement.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<note>
|
|
<para>
|
|
Los ejemplos listados quizá incluyen <literal>example.php</literal>,
|
|
que hacen referencia a la cadena XML encontrada en el primer ejemplo
|
|
de la guía de <link linkend="simplexml.examples-basic">uso básico</link>.
|
|
</para>
|
|
</note>
|
|
<example>
|
|
<title>Retornar el nombre del elemento XML</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
include 'example.php';
|
|
$sxe = new SimpleXMLElement($xmlstr);
|
|
|
|
echo $sxe->getName() . "\n";
|
|
|
|
foreach ($sxe->children() as $hijo)
|
|
{
|
|
echo $hijo->getName() . "\n";
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
peliculas
|
|
pelicula
|
|
]]>
|
|
</screen>
|
|
|
|
</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:"~/.phpdoc/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
|
|
-->
|