<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.xmlreader.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'xmlreader.setschema.php',
    1 => 'XMLReader::setSchema',
    2 => 'Validate document against XSD',
  ),
  'up' => 
  array (
    0 => 'class.xmlreader.php',
    1 => 'XMLReader',
  ),
  'prev' => 
  array (
    0 => 'xmlreader.setrelaxngschemasource.php',
    1 => 'XMLReader::setRelaxNGSchemaSource',
  ),
  'next' => 
  array (
    0 => 'xmlreader.xml.php',
    1 => 'XMLReader::XML',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/xmlreader/xmlreader/setschema.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="xmlreader.setschema" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">XMLReader::setSchema</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">XMLReader::setSchema</span> &mdash; <span class="dc-title">Validate document against XSD</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-xmlreader.setschema-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>XMLReader::setSchema</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$filename</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Use W3C XSD schema to validate the document as it is processed. Activation
   is only possible before the first Read().
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-xmlreader.setschema-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       The filename of the XSD schema.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-xmlreader.setschema-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-xmlreader.setschema-errors">
  <h3 class="title">Errori/Eccezioni</h3>
  <p class="para">
   Issues <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> if libxml was built without schema
   support, the schema contains errors or if
   <span class="function"><a href="xmlreader.read.php" class="function">XMLReader::read()</a></span> has already been called.
  </p>
 </div>

 
 
 
 <div class="refsect1 notes" id="refsect1-xmlreader.setschema-notes">
  <h3 class="title">Note</h3>
  <div class="caution"><strong class="caution">Attenzione</strong><p class="para">This function is only available when PHP is compiled against libxml 20620 or later.</p></div>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-xmlreader.setschema-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="xmlreader.setrelaxngschema.php" class="methodname" rel="rdfs-seeAlso">XMLReader::setRelaxNGSchema()</a> - Set the filename or URI for a RelaxNG Schema</span></li>
    <li><span class="methodname"><a href="xmlreader.setrelaxngschemasource.php" class="methodname" rel="rdfs-seeAlso">XMLReader::setRelaxNGSchemaSource()</a> - Set the data containing a RelaxNG Schema</span></li>
    <li><span class="methodname"><a href="xmlreader.isvalid.php" class="methodname" rel="rdfs-seeAlso">XMLReader::isValid()</a> - Indicates if the parsed document is valid</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>