-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy patheventhandlers.xml
116 lines (114 loc) · 3.62 KB
/
eventhandlers.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 47065812c2450dce5dcc8d62e80f1e75698c6163 Maintainer: mowangjuanzi Status: ready -->
<article xml:id="xml.eventhandlers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>事件处理程序</title>
<para>
XML 事件处理程序的定义如下:
<table>
<title>被支持的 XML 处理程序</title>
<tgroup cols="2">
<thead>
<row>
<entry>设置处理程序的 PHP 函数</entry>
<entry>事件描述</entry>
</row>
</thead>
<tbody>
<row>
<entry><function>xml_set_element_handler</function></entry>
<entry>
当 XML 解析器遇到开始或结束标签时,会触发元素事件。开始标签和结束标签有不同的处理程序。
</entry>
</row>
<row>
<entry>
<function>xml_set_character_data_handler</function>
</entry>
<entry>
字符数据范指 XML 文档中所有非标记的内容,包括标签之间的空格。注意,XML
解析器不会添加或删除任何空格,由应用程序(你)来判断空格是否有意义。
</entry>
</row>
<row>
<entry>
<function>xml_set_processing_instruction_handler</function>
</entry>
<entry>
PHP 程序员必须熟练掌握处理指令(PI)。<?php ?>是处理指令,其中 <replaceable>php</replaceable>
被称为“处理指令对象”。除所有以“XML”开头的处理指令对象是系统保留的外,其他的处理函数均是由应用程序指定的。
</entry>
</row>
<row>
<entry><function>xml_set_default_handler</function></entry>
<entry>
不执行其他处理函数,则会执行默认的处理函数。在默认的处理函数中可取得如 XML 和文档类型声明等信息。
</entry>
</row>
<row>
<entry>
<function>xml_set_unparsed_entity_decl_handler</function>
</entry>
<entry>
未解析的实体声明(NDATA)会调用此处理函数。
</entry>
</row>
<row>
<entry>
<function>xml_set_notation_decl_handler</function>
</entry>
<entry>
符号声明会调用此处理函数
</entry>
</row>
<row>
<entry>
<function>xml_set_external_entity_ref_handler</function>
</entry>
<entry>
当 XML 解析器发现对外部已解析的普通实体的引用时,
会调用此处理函数。例如,引用一个文件或URL。实例可参见
<link linkend="example.xml-external-entity">XML 外部实体示例</link>。
</entry>
</row>
<row>
<entry>
<function>xml_set_start_namespace_decl_handler</function>
</entry>
<entry>
在命名空间声明的开始处调用此处理程序。
</entry>
</row>
<row>
<entry>
<function>xml_set_end_namespace_decl_handler</function>
</entry>
<entry>
在命名空间声明的结束处调用此处理程序。请注意,此事件<emphasis>不是</emphasis>由 libXML 触发的。
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</article>
<!-- 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:"~/.phpdoc/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
-->