2014-09-05 07:44:07 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:59:47 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-12-24 12:30:24 +00:00
|
|
|
<refentry xml:id="simplexmliterator.valid" xmlns="http://docbook.org/ns/docbook">
|
2007-01-28 20:13:03 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>SimpleXMLIterator::valid</refname>
|
2009-04-12 00:23:21 +00:00
|
|
|
<refpurpose>Check whether the current element is valid</refpurpose>
|
2007-01-28 20:13:03 +00:00
|
|
|
</refnamediv>
|
2007-12-24 12:30:24 +00:00
|
|
|
<refsect1 role="description">
|
2008-03-20 01:25:04 +00:00
|
|
|
&reftitle.description;
|
2007-01-28 20:13:03 +00:00
|
|
|
<methodsynopsis>
|
2013-06-18 05:36:30 +00:00
|
|
|
<modifier>public</modifier> <type>bool</type><methodname>SimpleXMLIterator::valid</methodname>
|
2007-01-28 20:13:03 +00:00
|
|
|
<void/>
|
|
|
|
</methodsynopsis>
|
2009-04-12 00:23:21 +00:00
|
|
|
<para>
|
2009-04-12 04:14:50 +00:00
|
|
|
This method checks if the current element is valid after calls to
|
2009-04-12 04:46:39 +00:00
|
|
|
<methodname>SimpleXMLIterator::rewind</methodname> or
|
|
|
|
<methodname>SimpleXMLIterator::next</methodname>.
|
2009-04-12 00:23:21 +00:00
|
|
|
</para>
|
2007-01-28 20:13:03 +00:00
|
|
|
</refsect1>
|
2008-03-20 01:25:04 +00:00
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
&no.function.parameters;
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
2009-04-12 00:23:21 +00:00
|
|
|
Returns &true; if the current element is valid, otherwise &false;
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Check whether the current element is valid</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$xmlIterator = new SimpleXMLIterator('<books><book>SQL Basics</book></books>');
|
|
|
|
|
|
|
|
$xmlIterator->rewind(); // rewind to the first element
|
|
|
|
echo var_dump($xmlIterator->valid()); // bool(true)
|
|
|
|
|
|
|
|
$xmlIterator->next(); // advance to the next element
|
|
|
|
echo var_dump($xmlIterator->valid()); // bool(false) because there is only one element
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
2008-03-20 01:25:04 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-01-28 20:13:03 +00:00
|
|
|
</refentry>
|
2004-04-11 15:07:57 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2004-04-11 15:07:57 +00:00
|
|
|
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
|
|
|
|
-->
|