Generate xml methodsynopses based on stubs

Based on a patch contributed by Máté Kocsis <kocsismate@woohoolabs.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351469 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2020-11-21 14:06:31 +00:00
parent 9d3b35d2a8
commit 5ce1caaf99
22 changed files with 430 additions and 106 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-error-string">
<refentry xml:id="function.xml-error-string" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_error_string</refname>
<refpurpose>Get XML parser error string</refpurpose>
@ -9,12 +9,12 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>xml_error_string</methodname>
<methodparam><type>int</type><parameter>code</parameter></methodparam>
<type class="union"><type>string</type><type>null</type></type><methodname>xml_error_string</methodname>
<methodparam><type>int</type><parameter>error_code</parameter></methodparam>
</methodsynopsis>
<para>
Gets the XML parser error string associated with the given
<parameter>code</parameter>.
<parameter>error_code</parameter>.
</para>
</refsect1>
@ -23,7 +23,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>code</parameter></term>
<term><parameter>error_code</parameter></term>
<listitem>
<para>
An error code from <function>xml_get_error_code</function>.
@ -38,7 +38,7 @@
&reftitle.returnvalues;
<para>
Returns a string with a textual description of the error
<parameter>code</parameter>, or &false; if no description was found.
<parameter>error_code</parameter>, or &false; if no description was found.
</para>
</refsect1>
@ -52,7 +52,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-get-current-byte-index">
<refentry xml:id="function.xml-get-current-byte-index" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_get_current_byte_index</refname>
<refpurpose>Get current byte index for an XML parser</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xml_get_current_byte_index</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
</methodsynopsis>
<para>
Gets the current byte index of the given XML parser.
@ -52,6 +52,23 @@
</warning>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -63,7 +80,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-get-current-column-number">
<refentry xml:id="function.xml-get-current-column-number" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_get_current_column_number</refname>
<refpurpose>
@ -12,7 +12,7 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xml_get_current_column_number</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
</methodsynopsis>
<para>
Gets the current column number of the given XML parser.
@ -46,6 +46,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -57,7 +74,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-get-current-line-number">
<refentry xml:id="function.xml-get-current-line-number" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_get_current_line_number</refname>
<refpurpose>Get current line number for an XML parser</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xml_get_current_line_number</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
</methodsynopsis>
<para>
Gets the current line number for the given XML parser.
@ -42,6 +42,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -53,7 +70,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-get-error-code">
<refentry xml:id="function.xml-get-error-code" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_get_error_code</refname>
<refpurpose>Get XML parser error code</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xml_get_error_code</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
</methodsynopsis>
<para>
Gets the XML parser error code.
@ -43,6 +43,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -53,7 +70,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parse-into-struct">
<refentry xml:id="function.xml-parse-into-struct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parse_into_struct</refname>
<refpurpose>Parse XML data into an array structure</refpurpose>
@ -10,10 +10,10 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xml_parse_into_struct</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">values</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">index</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">index</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
This function parses an XML string into 2 parallel array structures, one
@ -72,6 +72,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -282,7 +299,6 @@ Array
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parse">
<refentry xml:id="function.xml-parse" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parse</refname>
<refpurpose>Start parsing an XML document</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xml_parse</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>is_final</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
@ -77,6 +77,23 @@
</note>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example xml:id="xml_parse.example.chunked">
@ -104,7 +121,6 @@ fclose($stream);
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id='function.xml-parser-create-ns'>
<refentry xml:id="function.xml-parser-create-ns" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_create_ns</refname>
<refpurpose>Create an XML parser with namespace support</refpurpose>
@ -9,14 +9,14 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>resource</type><type>false</type></type><methodname>xml_parser_create_ns</methodname>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
<type>XmlParser</type><methodname>xml_parser_create_ns</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>":"</initializer></methodparam>
</methodsynopsis>
<para>
<function>xml_parser_create_ns</function> creates a new XML parser
with XML namespace support and returns a resource handle referencing
it to be used by the other XML functions.
with XML namespace support and returns a <classname>XMLParser</classname>
instance to be used by the other XML functions.
</para>
</refsect1>
@ -54,10 +54,39 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a resource handle for the new XML parser, &return.falseforfailure;.
Returns a new <classname>XMLParser</classname> instance.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
This function returns an <classname>XMLParser</classname> instance now;
previously, a <type>resource</type> was returned, &return.falseforfailure;.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>encoding</parameter> is nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -69,7 +98,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-create">
<refentry xml:id="function.xml-parser-create" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_create</refname>
<refpurpose>Create an XML parser</refpurpose>
@ -9,12 +9,12 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>resource</type><type>false</type></type><methodname>xml_parser_create</methodname>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
<type>XmlParser</type><methodname>xml_parser_create</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>xml_parser_create</function> creates a new XML parser
and returns a resource handle referencing it to be used by the
and returns a <classname>XMLParser</classname> instance to be used by the
other XML functions.
</para>
</refsect1>
@ -48,10 +48,39 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a resource handle for the new XML parser, &return.falseforfailure;.
Returns a new <classname>XMLParser</classname> instance.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
This function returns an <classname>XMLParser</classname> instance now;
previously, a <type>resource</type> was returned, &return.falseforfailure;.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>encoding</parameter> is nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -63,7 +92,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-free">
<refentry xml:id="function.xml-parser-free" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_free</refname>
<refpurpose>Free an XML parser</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_parser_free</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
</methodsynopsis>
<para>
Frees the given XML <parameter>parser</parameter>.
@ -18,7 +18,7 @@
<caution>
<para>
In addition to calling <function>xml_parser_free</function> when the parsing
is finished, as of PHP 7.0.0 it is necessary to also explicitly unset the
is finished, prior to PHP 8.0.0, it was necessary to also explicitly unset the
reference to <parameter>parser</parameter> to avoid memory leaks,
if the parser resource is referenced from an object, and this object references
that parser resource.
@ -45,13 +45,28 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This function returns &false; if <parameter>parser</parameter> does not
refer to a valid parser, or else it frees the parser and returns &true;.
&return.success;
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-get-option">
<refentry xml:id="function.xml-parser-get-option" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_get_option</refname>
<refpurpose>Get options from an XML parser</refpurpose>
@ -9,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>xml_parser_get_option</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<type class="union"><type>string</type><type>int</type></type><methodname>xml_parser_get_option</methodname>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>int</type><parameter>option</parameter></methodparam>
</methodsynopsis>
<para>
@ -66,6 +66,7 @@
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
<row>
<entry>7.1.24, 7.2.12, 7.3.0</entry>
<entry>
@ -79,7 +80,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-set-option">
<refentry xml:id="function.xml-parser-set-option" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_parser_set_option</refname>
<refpurpose>Set options in an XML parser</refpurpose>
@ -10,9 +10,9 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_parser_set_option</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>int</type><parameter>option</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam><type class="union"><type>string</type><type>int</type></type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
Sets an option in an XML parser.
@ -112,8 +112,24 @@
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-set-character-data-handler">
<refentry xml:id="function.xml-set-character-data-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_character_data_handler</refname>
<refpurpose>Set up character data handler</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_character_data_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -44,7 +44,7 @@
two parameters:
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<variablelist>
@ -91,8 +91,24 @@
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-set-default-handler">
<refentry xml:id="function.xml-set-default-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_default_handler</refname>
<refpurpose>Set up default handler</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_default_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -44,7 +44,7 @@
two parameters:
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<variablelist>
@ -85,6 +85,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
@ -93,7 +110,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-set-element-handler">
<refentry xml:id="function.xml-set-element-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_element_handler</refname>
<refpurpose>Set up start and end element handlers</refpurpose>
@ -10,14 +10,14 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_element_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>start_element_handler</parameter></methodparam>
<methodparam><type>callable</type><parameter>end_element_handler</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>start_handler</parameter></methodparam>
<methodparam><type>callable</type><parameter>end_handler</parameter></methodparam>
</methodsynopsis>
<para>
Sets the element handler functions for the XML <parameter>parser</parameter>.
<parameter>start_element_handler</parameter> and
<parameter>end_element_handler</parameter> are strings containing
<parameter>start_handler</parameter> and
<parameter>end_handler</parameter> are strings containing
the names of functions that must exist when <function>xml_parse</function>
is called for <parameter>parser</parameter>.
</para>
@ -36,14 +36,14 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>start_element_handler</parameter></term>
<term><parameter>start_handler</parameter></term>
<listitem>
<para>
The function named by <parameter>start_element_handler</parameter>
The function named by <parameter>start_handler</parameter>
must accept three parameters:
<methodsynopsis>
<methodname><replaceable>start_element_handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter>attribs</parameter></methodparam>
</methodsynopsis>
@ -94,14 +94,14 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>end_element_handler</parameter></term>
<term><parameter>end_handler</parameter></term>
<listitem>
<para>
The function named by <parameter>end_element_handler</parameter>
The function named by <parameter>end_handler</parameter>
must accept two parameters:
<methodsynopsis>
<methodname><replaceable>end_element_handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<variablelist>
@ -144,8 +144,24 @@
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id='function.xml-set-end-namespace-decl-handler'>
<refentry xml:id="function.xml-set-end-namespace-decl-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_end_namespace_decl_handler</refname>
<refpurpose>Set up end namespace declaration handler</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_end_namespace_decl_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -56,7 +56,7 @@
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>.
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
</methodsynopsis>
<variablelist>
@ -97,6 +97,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -107,7 +124,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-set-external-entity-ref-handler">
<refentry xml:id="function.xml-set-external-entity-ref-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_external_entity_ref_handler</refname>
<refpurpose>Set up external entity reference handler</refpurpose>
@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_external_entity_ref_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -48,7 +48,7 @@
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>.
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>open_entity_names</parameter></methodparam>
<methodparam><type>string</type><parameter>base</parameter></methodparam>
<methodparam><type>string</type><parameter>system_id</parameter></methodparam>
@ -137,6 +137,7 @@
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
<row>
<entry>7.3.0</entry>
<entry>
@ -151,7 +152,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook"
xml:id="function.xml-set-notation-decl-handler"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xml:id="function.xml-set-notation-decl-handler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>xml_set_notation_decl_handler</refname>
<refpurpose>Set up notation declaration handler</refpurpose>
@ -12,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_notation_decl_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -58,7 +56,7 @@
five parameters:
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>notation_name</parameter></methodparam>
<methodparam><type>string</type><parameter>base</parameter></methodparam>
<methodparam><type>string</type><parameter>system_id</parameter></methodparam>
@ -135,8 +133,24 @@
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-set-object">
<refentry xml:id="function.xml-set-object" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_object</refname>
<refpurpose>Use XML Parser within an object</refpurpose>
@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_object</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>object</type><parameter role="reference">object</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>object</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>
This function allows to use <parameter>parser</parameter> inside
@ -52,6 +52,23 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -122,7 +139,6 @@ string(1) "A"
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-set-processing-instruction-handler">
<refentry xml:id="function.xml-set-processing-instruction-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_processing_instruction_handler</refname>
<refpurpose>
@ -12,7 +12,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_processing_instruction_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -23,7 +23,7 @@
A processing instruction has the following format:
<informalexample>
<programlisting>&lt;?<replaceable>target</replaceable>
<replaceable>data</replaceable>?>
<replaceable>data</replaceable>?&gt;
</programlisting>
</informalexample>
You can put PHP code into such a tag, but be aware of one limitation: in
@ -59,7 +59,7 @@
three parameters:
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>target</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
@ -111,8 +111,24 @@
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id='function.xml-set-start-namespace-decl-handler'>
<refentry xml:id="function.xml-set-start-namespace-decl-handler" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>xml_set_start_namespace_decl_handler</refname>
<refpurpose>
@ -12,7 +12,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_start_namespace_decl_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -52,7 +52,7 @@
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>.
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam><type>string</type><parameter>uri</parameter></methodparam>
</methodsynopsis>
@ -100,6 +100,24 @@
&return.success;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>

View file

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook"
xml:id="function.xml-set-unparsed-entity-decl-handler"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refentry xml:id="function.xml-set-unparsed-entity-decl-handler" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>xml_set_unparsed_entity_decl_handler</refname>
<refpurpose>
@ -14,7 +12,7 @@
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xml_set_unparsed_entity_decl_handler</methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
@ -64,7 +62,7 @@
parameters:
<methodsynopsis>
<methodname><replaceable>handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
<methodparam><type>XmlParser</type><parameter>parser</parameter></methodparam>
<methodparam><type>string</type><parameter>entity_name</parameter></methodparam>
<methodparam><type>string</type><parameter>base</parameter></methodparam>
<methodparam><type>string</type><parameter>system_id</parameter></methodparam>
@ -145,8 +143,24 @@
</para>
</refsect1>
</refentry>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&xml.changelog.parser-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml