reference/xml/functions/xml-parser-create.xml
8cdc6621f9826d04abc3e50438c010804d7e8683
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.xml-parser-create">
3
+
<refentry xml:id="function.xml-parser-create" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>xml_parser_create</refname>
6
6
<refpurpose>Create an XML parser</refpurpose>
...
...
@@ -9,12 +9,12 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>xml_parser_create</methodname>
13
-
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
12
+
<type>XMLParser</type><methodname>xml_parser_create</methodname>
13
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
<function>xml_parser_create</function> creates a new XML parser
17
-
and returns a resource handle referencing it to be used by the
17
+
and returns a <classname>XMLParser</classname> instance to be used by the
18
18
other XML functions.
19
19
</para>
20
20
</refsect1>
...
...
@@ -27,15 +27,12 @@
27
27
<term><parameter>encoding</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
The optional <parameter>encoding</parameter> specifies the character
31
-
encoding for the input/output in PHP 4. Starting from PHP 5, the input
30
+
The input
32
31
encoding is automatically detected, so that the
33
32
<parameter>encoding</parameter> parameter specifies only the output
34
-
encoding. In PHP 4, the default output encoding is the same as the
35
-
input charset. If empty string is passed, the parser attempts to identify
33
+
encoding. If empty string is passed, the parser attempts to identify
36
34
which encoding the document is encoded in by looking at the heading 3 or
37
-
4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is
38
-
ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported
35
+
4 bytes. The default output charset is UTF-8. The supported
39
36
encodings are <literal>ISO-8859-1</literal>, <literal>UTF-8</literal> and
40
37
<literal>US-ASCII</literal>.
41
38
</para>
...
...
@@ -48,10 +45,39 @@
48
45
<refsect1 role="returnvalues">
49
46
&reftitle.returnvalues;
50
47
<para>
51
-
Returns a resource handle for the new XML parser.
48
+
Returns a new <classname>XMLParser</classname> instance.
52
49
</para>
53
50
</refsect1>
54
51

52
+
<refsect1 role="changelog">
53
+
&reftitle.changelog;
54
+
<informaltable>
55
+
<tgroup cols="2">
56
+
<thead>
57
+
<row>
58
+
<entry>&Version;</entry>
59
+
<entry>&Description;</entry>
60
+
</row>
61
+
</thead>
62
+
<tbody>
63
+
<row>
64
+
<entry>8.0.0</entry>
65
+
<entry>
66
+
This function returns an <classname>XMLParser</classname> instance now;
67
+
previously, a <type>resource</type> was returned, &return.falseforfailure;.
68
+
</entry>
69
+
</row>
70
+
<row>
71
+
<entry>8.0.0</entry>
72
+
<entry>
73
+
<parameter>encoding</parameter> is nullable now.
74
+
</entry>
75
+
</row>
76
+
</tbody>
77
+
</tgroup>
78
+
</informaltable>
79
+
</refsect1>
80
+

55
81
<refsect1 role="seealso">
56
82
&reftitle.seealso;
57
83
<para>
...
...
@@ -63,7 +89,6 @@
63
89
</refsect1>
64
90

65
91
</refentry>
66
-

67
92
<!-- Keep this comment at the end of the file
68
93
Local variables:
69
94
mode: sgml
70
95