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/function.xml-parser-set-option.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.xml.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.xml-parser-set-option.php',
   
1 => 'xml_parser_set_option',
  ),
 
'up' =>
  array (
   
0 => 'ref.xml.php',
   
1 => 'XML Parser Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.xml-parser-get-option.php',
   
1 => 'xml_parser_get_option',
  ),
 
'next' =>
  array (
   
0 => 'function.xml-set-character-data-handler.php',
   
1 => 'xml_set_character_data_handler',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.xml-parser-set-option" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xml_parser_set_option</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">xml_parser_set_option</span> &mdash; <span class="dc-title">Set options in an XML parser</span></p>

 </div>
 
 <a name="function.xml-parser-set-option.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><b>xml_parser_set_option</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$parser</tt></span>
   , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$option</tt></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <tt class="parameter">$value</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Sets an option in an XML parser.
  </p>
 </div>


 <a name="function.xml-parser-set-option.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">parser</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       A reference to the XML parser to set an option in.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">option</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Which option to set.  See below.
      </p>
      <p class="para">
       The following options are available:
       </p><table class="doctable table">
        <caption><b>XML parser options</b></caption>
       
         <thead valign="middle">
          <tr valign="middle">
           <th>Option constant</th>
           <th>Data type</th>
           <th>Description</th>
          </tr>

         </thead>

         <tbody valign="middle" class="tbody">
          <tr valign="middle">
           <td align="left"><b><tt class="constant">XML_OPTION_CASE_FOLDING</tt></b></td>
           <td align="left">integer</td>
           <td align="left">
            Controls whether <a href="xml.case-folding.php" class="link">case-folding</a> is enabled for this
            XML parser.  Enabled by default.
           </td>
          </tr>

          <tr valign="middle">
           <td align="left"><b><tt class="constant">XML_OPTION_SKIP_TAGSTART</tt></b></td>
           <td align="left">integer</td>
           <td align="left">
            Specify how many characters should be skipped in the beginning of a
            tag name.
           </td>
          </tr>

          <tr valign="middle">
           <td align="left"><b><tt class="constant">XML_OPTION_SKIP_WHITE</tt></b></td>
           <td align="left">integer</td>
           <td align="left">
            Whether to skip values consisting of whitespace characters.
           </td>
          </tr>

          <tr valign="middle">
           <td align="left"><b><tt class="constant">XML_OPTION_TARGET_ENCODING</tt></b></td>
           <td align="left">string</td>
           <td align="left">
            Sets which <a href="xml.encoding.php" class="link">target encoding</a> to
            use in this XML parser.By default, it is set to the same as the
            source encoding used by <a href="function.xml-parser-create.php" class="function">xml_parser_create()</a>.
            Supported target encodings are <i>ISO-8859-1</i>,
            <i>US-ASCII</i> and <i>UTF-8</i>.
           </td>
          </tr>

         </tbody>
       
       </table>
<p>
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">value</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The option&#039;s new value.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.xml-parser-set-option.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   This function returns <b><tt class="constant">FALSE</tt></b> if <i><tt class="parameter">parser</tt></i>
 does not
   refer to a valid parser, or if the option could not be set.  Else the
   option is set and <b><tt class="constant">TRUE</tt></b> is returned.
  </p>
 </div>


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