Source of: /manual/fa/xml.eventhandlers.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.xml.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'fa',
),
'this' =>
array (
0 => 'xml.eventhandlers.php',
1 => 'Event Handlers',
),
'up' =>
array (
0 => 'book.xml.php',
1 => 'XML Parser',
),
'prev' =>
array (
0 => 'xml.constants.php',
1 => 'Predefined Constants',
),
'next' =>
array (
0 => 'xml.case-folding.php',
1 => 'Case Folding',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="xml.eventhandlers" class="article">
<h1>Event Handlers</h1>
<p class="para">
The XML event handlers defined are:
<table class="doctable table">
<caption><b>Supported XML handlers</b></caption>
<thead valign="middle">
<tr valign="middle">
<th>PHP function to set handler</th>
<th>Event description</th>
</tr>
</thead>
<tbody valign="middle" class="tbody">
<tr valign="middle">
<td align="left"><span class="function"><a href="function.xml-set-element-handler.php" class="function">xml_set_element_handler()</a></span></td>
<td align="left">
Element events are issued whenever the XML parser
encounters start or end tags. There are separate handlers
for start tags and end tags.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-character-data-handler.php" class="function">xml_set_character_data_handler()</a></span>
</td>
<td align="left">
Character data is roughly all the non-markup contents of
XML documents, including whitespace between tags. Note
that the XML parser does not add or remove any whitespace,
it is up to the application (you) to decide whether
whitespace is significant.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-processing-instruction-handler.php" class="function">xml_set_processing_instruction_handler()</a></span>
</td>
<td align="left">
PHP programmers should be familiar with processing
instructions (PIs) already. <?php ?> is a processing
instruction, where <span class="replaceable">php</span> is called
the "PI target". The handling of these are
application-specific, except that all PI targets starting
with "XML" are reserved.
</td>
</tr>
<tr valign="middle">
<td align="left"><span class="function"><a href="function.xml-set-default-handler.php" class="function">xml_set_default_handler()</a></span></td>
<td align="left">
What goes not to another handler goes to the default
handler. You will get things like the XML and document
type declarations in the default handler.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-unparsed-entity-decl-handler.php" class="function">xml_set_unparsed_entity_decl_handler()</a></span>
</td>
<td align="left">
This handler will be called for declaration of an unparsed
(NDATA) entity.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-notation-decl-handler.php" class="function">xml_set_notation_decl_handler()</a></span>
</td>
<td align="left">
This handler is called for declaration of a notation.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-external-entity-ref-handler.php" class="function">xml_set_external_entity_ref_handler()</a></span>
</td>
<td align="left">
This handler is called when the XML parser finds a
reference to an external parsed general entity. This can
be a reference to a file or URL, for example. See <a href="example.xml-external-entity.php" class="link">the external entity
example</a> for a demonstration.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-start-namespace-decl-handler.php" class="function">xml_set_start_namespace_decl_handler()</a></span>
</td>
<td align="left">
This handler is called for the start of a namespace declaration.
</td>
</tr>
<tr valign="middle">
<td align="left">
<span class="function"><a href="function.xml-set-end-namespace-decl-handler.php" class="function">xml_set_end_namespace_decl_handler()</a></span>
</td>
<td align="left">
This handler is called for the end of a namespace declaration. Note
that this event is <em class="emphasis">NOT</em> under LibXML.
</td>
</tr>
</tbody>
</table>
</p>
</div>
<?php manual_footer(); ?>