downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/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 => 'en',
  ),
 
'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>
 <h1>Event Handlers</h1>

 <p class="para">
  The XML event handlers defined are:
  </p><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"><a href="function.xml-set-element-handler.php" class="function">xml_set_element_handler()</a></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">
       <a href="function.xml-set-character-data-handler.php" class="function">xml_set_character_data_handler()</a>
      </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">
       <a href="function.xml-set-processing-instruction-handler.php" class="function">xml_set_processing_instruction_handler()</a>
      </td>
      <td align="left">
       PHP programmers should be familiar with processing
       instructions (PIs) already.  &lt;?php ?&gt; is a processing
       instruction, where <span class="replaceable">php</span> is called
       the &quot;PI target&quot;.  The handling of these are
       application-specific, except that all PI targets starting
       with &quot;XML&quot; are reserved.
      </td>
     </tr>

     <tr valign="middle">
      <td align="left"><a href="function.xml-set-default-handler.php" class="function">xml_set_default_handler()</a></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">
       <a href="function.xml-set-unparsed-entity-decl-handler.php" class="function">xml_set_unparsed_entity_decl_handler()</a>
      </td>
      <td align="left">
       This handler will be called for declaration of an unparsed
       (NDATA) entity.
      </td>
     </tr>

     <tr valign="middle">
      <td align="left">
       <a href="function.xml-set-notation-decl-handler.php" class="function">xml_set_notation_decl_handler()</a>
      </td>
      <td align="left">
       This handler is called for declaration of a notation.
      </td>
     </tr>

     <tr valign="middle">
      <td align="left">
       <a href="function.xml-set-external-entity-ref-handler.php" class="function">xml_set_external_entity_ref_handler()</a>
      </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>

    </tbody>
  
  </table>
<p>
 </p>
</div>
<?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites