mirror of
https://github.com/php/doc-ru.git
synced 2026-03-24 15:52:13 +01:00
* Update basic.xml to en * Update properties.xml to en * Update traits.xml to En * Update visibility.xml to en * Update book.xml to en * Update book.xml to en + infostyle * Update mb-convert-encoding.xml to en * Update book.xml to en * Update mb-convert-encoding.xml nit * Update preg-replace-callback.xml to en + infostyle * Update preg-replace-callback.xml to en actually * Update book.xml to en * Update simplexml-load-file.xml to en + infostyle * Update addAttribute.xml to en * Update addChild.xml to en * Update construct.xml to en * Update getName.xml to en * Update book.xml to en * Update xml-parse.xml to en + infostyle * Update book.xml to en * Update isvalid.xml to en * Update book.xml to en
93 lines
2.5 KiB
XML
93 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: c1f37a6c270aadbbb3da56a3973ffd62197adf2b Maintainer: mch Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<refentry xml:id="simplexmlelement.getname" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>SimpleXMLElement::getName</refname>
|
||
<refpurpose>Получает название XML-элемента</refpurpose>
|
||
</refnamediv>
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis role="SimpleXMLElement">
|
||
<modifier>public</modifier> <type>string</type><methodname>SimpleXMLElement::getName</methodname>
|
||
<void/>
|
||
</methodsynopsis>
|
||
<para>
|
||
Метод получает название XML-элемента.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
&no.function.parameters;
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Метод <literal>getName</literal> возвращает название XML-тега как значение
|
||
<type>string</type>, на которое ссылается объект SimpleXMLElement.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<note>
|
||
<para>
|
||
В следующем примере включается файл <literal>examples/simplexml-data.php</literal>
|
||
с определением XML-строки из первого примера руководства
|
||
«<link linkend="simplexml.examples-basic">Основы работы с модулем SimpleXML</link>».
|
||
</para>
|
||
</note>
|
||
<example>
|
||
<title>Пример получения названий XML-элементов</title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
|
||
include 'examples/simplexml-data.php';
|
||
$sxe = new SimpleXMLElement($xmlstr);
|
||
|
||
echo $sxe->getName() . "\n";
|
||
|
||
foreach ($sxe->children() as $child) {
|
||
echo $child->getName() . "\n";
|
||
}
|
||
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
&example.outputs;
|
||
<screen>
|
||
<![CDATA[
|
||
movies
|
||
movie
|
||
]]>
|
||
</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
|
||
-->
|