cvs: phpdoc-hu /reference/simplexml/functions simplexml-element-children.xml
| From: | Lajos Cseppent� | Date: | Fri, 09 Jun 2006 04:13:05 +0000 |
| Subject: | cvs: phpdoc-hu /reference/simplexml/functions simplexml-element-children.xml | ||
| Groups: | php.doc.hu | ||
| Request: | Send a blank email to doc-hu+get-1405@lists.php.net to get a copy of this message | ||
chappy Fri Jun 9 04:13:05 2006 UTC
Added files:
/phpdoc-hu/reference/simplexml/functions
simplexml-element-children.xml
Log:
SimpleXMLElement->children
http://cvs.php.net/viewcvs.cgi/phpdoc-hu/reference/simplexml/functions/simplexml-element-children.xml?view=markup&rev=1.1
Index: phpdoc-hu/reference/simplexml/functions/simplexml-element-children.xml
+++ phpdoc-hu/reference/simplexml/functions/simplexml-element-children.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.simplexml-element-children'>
<refnamediv>
<refname>SimpleXMLElement->children</refname>
<refpurpose>
A megadott csomó utódjait keresi meg.
</refpurpose>
</refnamediv>
<refsect1>
<title>Leírás</title>
<methodsynopsis>
<type>SimpleXMLElement</type><methodname>simplexml_element->children</methodname>
<methodparam
choice="opt"><type>string</type><parameter>nsprefix</parameter></methodparam>
</methodsynopsis>
<para>
Ez a metódus megkeresi az elem utódjait, ha ez tag. Az eredmény a
normál körbejárási szabályokat követi.
</para>
&simplexml.iteration;
<example>
<title><literal>children()</literal> használata</title>
<programlisting role="php">
<![CDATA[
<?php
$xml = simplexml_load_string(
'<person>
<child role="son">
<child role="daughter"/>
</child>
<child role="daughter">
<child role="son">
<child role="son"/>
</child>
</child>
</person>');
foreach ($xml->children() as $second_gen) {
echo ' The person begot a ' . $second_gen['role'];
foreach ($second_gen->children() as $third_gen) {
echo ' who begot a ' . $third_gen['role'] . ';';
foreach ($third_gen->children() as $fourth_gen) {
echo ' and that ' . $third_gen['role'] .
' begot a ' . $fourth_gen['role'];
}
}
}
?>
]]>
</programlisting>
<simpara>
A fenti kód kimenete:
</simpara>
<screen>
<![CDATA[
The person begot a son who begot a daughter; The person
begot a daughter who begot a son; and that son begot a son
]]>
</screen>
</example>
</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
-->