Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6633

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set options in an XML parser</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.xml-parser-get-option.html">xml_parser_get_option</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.xml-set-character-data-handler.html">xml_set_character_data_handler</a></div>
 <div class="up"><a href="ref.xml.html">XML Parser Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><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>
 
 <div class="refsect1 description" id="refsect1-function.xml-parser-set-option-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>xml_parser_set_option</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$parser</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
   )</div>

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


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

    <dt>

     <span class="term"><em><code class="parameter">parser</code></em></span>
     <dd>

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

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">option</code></em></span>
     <dd>

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

         </thead>

         <tbody class="tbody">
          <tr>
           <td><strong><code>XML_OPTION_CASE_FOLDING</code></strong></td>
           <td>integer</td>
           <td>
            Controls whether <a href="xml.case-folding.html" class="link">case-folding</a> is enabled for this
            XML parser.  Enabled by default.
           </td>
          </tr>

          <tr>
           <td><strong><code>XML_OPTION_SKIP_TAGSTART</code></strong></td>
           <td>integer</td> 
           <td>
            Specify how many characters should be skipped in the beginning of a
            tag name.
           </td>
          </tr>

          <tr>
           <td><strong><code>XML_OPTION_SKIP_WHITE</code></strong></td>
           <td>integer</td> 
           <td>
            Whether to skip values consisting of whitespace characters.
           </td>
          </tr>

          <tr>
           <td><strong><code>XML_OPTION_TARGET_ENCODING</code></strong></td>
           <td>string</td> 
           <td>
            Sets which <a href="xml.encoding.html" 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  <span class="function"><a href="function.xml-parser-create.html" class="function">xml_parser_create()</a></span>.
            Supported target encodings are <em>ISO-8859-1</em>,
            <em>US-ASCII</em> and <em>UTF-8</em>.
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">value</code></em></span>
     <dd>

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

    </dt>

   </dl>

  </p>
 </div>


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


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.xml-parser-get-option.html">xml_parser_get_option</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.xml-set-character-data-handler.html">xml_set_character_data_handler</a></div>
 <div class="up"><a href="ref.xml.html">XML Parser Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>