Skip to content

Commit 6bd4704

Browse files
committed
Sync xml functions
1 parent 1d32f9b commit 6bd4704

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

reference/xml/examples.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 802374deda550dfb866348d41a019315cb1f9840 Maintainer: Luffy Status: ready -->
3+
<!-- EN-Revision: 00a8ae0c879a70f4bc96a707212482f0fcbd9ac6 Maintainer: Luffy Status: ready -->
44
<chapter xml:id="xml.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
55
&reftitle.examples;
66
<section xml:id="example.xml-structure">
@@ -45,7 +45,6 @@ while ($data = fread($fp, 4096)) {
4545
xml_get_current_line_number($xml_parser)));
4646
}
4747
}
48-
xml_parser_free($xml_parser);
4948
?>
5049
]]>
5150
</programlisting>
@@ -110,7 +109,6 @@ while ($data = fread($fp, 4096)) {
110109
xml_get_current_line_number($xml_parser)));
111110
}
112111
}
113-
xml_parser_free($xml_parser);
114112
?>
115113
]]>
116114
</programlisting>
@@ -208,11 +206,9 @@ function externalEntityRefHandler($parser, $openEntityNames, $base, $systemId,
208206
printf("XML error: %s at line %d while parsing entity %s\n",
209207
xml_error_string(xml_get_error_code($parser)),
210208
xml_get_current_line_number($parser), $openEntityNames);
211-
xml_parser_free($parser);
212209
return false;
213210
}
214211
}
215-
xml_parser_free($parser);
216212
return true;
217213
}
218214
return false;
@@ -254,7 +250,6 @@ while ($data = fread($fp, 4096)) {
254250
}
255251
echo "</pre>";
256252
echo "parse complete\n";
257-
xml_parser_free($xml_parser);
258253
259254
?>
260255
]]>
@@ -419,4 +414,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
419414
vim: et tw=78 syn=sgml
420415
vi: ts=1 sw=1
421416
-->
422-

reference/xml/functions/xml-parse-into-struct.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 18aa2012f6fa1e5b09733147e02911d16e06d4a1 Maintainer: class007 Status: ready -->
3+
<!-- EN-Revision: 00a8ae0c879a70f4bc96a707212482f0fcbd9ac6 Maintainer: class007 Status: ready -->
44
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.xml-parse-into-struct" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -99,7 +99,6 @@
9999
$simple = "<para><note>simple note</note></para>";
100100
$p = xml_parser_create();
101101
xml_parse_into_struct($p, $simple, $vals, $index);
102-
xml_parser_free($p);
103102
echo "Index array\n";
104103
print_r($index);
105104
echo "\nVals array\n";
@@ -215,7 +214,7 @@ function readDatabase($filename)
215214
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
216215
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
217216
xml_parse_into_struct($parser, $data, $values, $tags);
218-
xml_parser_free($parser);
217+
unset($parser);
219218
220219
// loop through the structures
221220
foreach ($tags as $key=>$val) {

reference/xml/functions/xml-parse.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c1f37a6c270aadbbb3da56a3973ffd62197adf2b Maintainer: HonestQiao Status: ready -->
3+
<!-- EN-Revision: 00a8ae0c879a70f4bc96a707212482f0fcbd9ac6 Maintainer: HonestQiao Status: ready -->
44
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.xml-parse" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -109,7 +109,6 @@ while (($data = fread($stream, 16384))) {
109109
xml_parse($parser, $data); // parse the current chunk
110110
}
111111
xml_parse($parser, '', true); // finalize parsing
112-
xml_parser_free($parser);
113112
fclose($stream);
114113
]]>
115114
</programlisting>

reference/xml/functions/xml-parser-create-ns.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: f9c4a68ef4f89e51e6d9b905ad3ddb6492386dd3 Maintainer: class007 Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
3+
<!-- EN-Revision: 00a8ae0c879a70f4bc96a707212482f0fcbd9ac6 Maintainer: class007 Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.xml-parser-create-ns" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
77
<refname>xml_parser_create_ns</refname>
@@ -85,7 +85,6 @@
8585
<para>
8686
<simplelist>
8787
<member><function>xml_parser_create</function></member>
88-
<member><function>xml_parser_free</function></member>
8988
</simplelist>
9089
</para>
9190
</refsect1>

reference/xml/functions/xml-parser-create.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 8cdc6621f9826d04abc3e50438c010804d7e8683 Maintainer: class007 Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
3+
<!-- EN-Revision: 00a8ae0c879a70f4bc96a707212482f0fcbd9ac6 Maintainer: class007 Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.xml-parser-create" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
77
<refname>xml_parser_create</refname>
@@ -76,7 +76,6 @@
7676
<para>
7777
<simplelist>
7878
<member><function>xml_parser_create_ns</function></member>
79-
<member><function>xml_parser_free</function></member>
8079
</simplelist>
8180
</para>
8281
</refsect1>

reference/xml/functions/xml-parser-free.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 52dc204a77076e1404257cf39f179882b90b5780 Maintainer: Gregory Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
3+
<!-- EN-Revision: 00a8ae0c879a70f4bc96a707212482f0fcbd9ac6 Maintainer: Gregory Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.xml-parser-free" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
77
<refname>xml_parser_free</refname>
88
<refpurpose>释放 XML 解析器</refpurpose>
99
</refnamediv>
1010

11+
<refsynopsisdiv>
12+
&warn.deprecated.function-8-5-0;
13+
</refsynopsisdiv>
14+
1115
<refsect1 role="description">
1216
&reftitle.description;
1317
<methodsynopsis>
18+
<modifier role="attribute">#[\Deprecated]</modifier>
1419
<type>bool</type><methodname>xml_parser_free</methodname>
1520
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
1621
</methodsynopsis>
@@ -60,6 +65,12 @@
6065
</row>
6166
</thead>
6267
<tbody>
68+
<row>
69+
<entry>8.5.0</entry>
70+
<entry>
71+
此函数已被弃用。
72+
</entry>
73+
</row>
6374
&xml.changelog.parser-param;
6475
</tbody>
6576
</tgroup>

0 commit comments

Comments
 (0)