<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.libxml.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'libxml.constants.php',
    1 => 'Predefined Constants',
    2 => 'Predefined Constants',
  ),
  'up' => 
  array (
    0 => 'book.libxml.php',
    1 => 'libxml',
  ),
  'prev' => 
  array (
    0 => 'libxml.installation_old.php',
    1 => 'Installation for PHP versions &lt; 7.4',
  ),
  'next' => 
  array (
    0 => 'class.libxmlerror.php',
    1 => 'LibXMLError',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/libxml/constants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="libxml.constants" class="appendix">
 <h1 class="title">Predefined Constants</h1>

 <p class="simpara">
The constants below are defined by this extension, and
will only be available when the extension has either
been compiled into PHP or dynamically loaded at runtime.
</p>
 <dl>
  
   <dt id="constant.libxml-biglines">
    <strong><code><a href="libxml.constants.php#constant.libxml-biglines">LIBXML_BIGLINES</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Allows line numbers greater than 65535 to be reported correctly.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available as of PHP 7.0.0 with Libxml &gt;= 2.9.0
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-compact">
    <strong><code><a href="libxml.constants.php#constant.libxml-compact">LIBXML_COMPACT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Activate small nodes allocation optimization. This may speed up your
     application without needing to change the code.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.6.21
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-dtdattr">
    <strong><code><a href="libxml.constants.php#constant.libxml-dtdattr">LIBXML_DTDATTR</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Default DTD attributes
    </span>
    <div class="caution"><strong class="caution">Caution</strong>
     <p class="simpara">
      Enabling loading of DTD attributes will enable fetching of external entities.
      The <strong><code><a href="libxml.constants.php#constant.libxml-no-xxe">LIBXML_NO_XXE</a></code></strong> constant can be used to prevent this (only available in Libxml &gt;= 2.13.0, as of PHP 8.4.0).
     </p>
    </div>
   </dd>
  
  
   <dt id="constant.libxml-dtdload">
    <strong><code><a href="libxml.constants.php#constant.libxml-dtdload">LIBXML_DTDLOAD</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Load the external subset
    </span>
    <div class="caution"><strong class="caution">Caution</strong>
     <p class="simpara">
      Enabling loading of external subsets will enable fetching of external entities.
      The <strong><code><a href="libxml.constants.php#constant.libxml-no-xxe">LIBXML_NO_XXE</a></code></strong> constant can be used to prevent this (only available in Libxml &gt;= 2.13.0, as of PHP 8.4.0).
     </p>
    </div>
   </dd>
  
  
   <dt id="constant.libxml-dtdvalid">
    <strong><code><a href="libxml.constants.php#constant.libxml-dtdvalid">LIBXML_DTDVALID</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Validate with the DTD
    </span>
    <div class="caution"><strong class="caution">Caution</strong>
     <p class="simpara">
      Enabling validating the DTD may facilitate XML External Entity (XXE) attacks.
      The <strong><code><a href="libxml.constants.php#constant.libxml-no-xxe">LIBXML_NO_XXE</a></code></strong> constant can be used to prevent this (only available in Libxml &gt;= 2.13.0, as of PHP 8.4.0).
     </p>
    </div>
   </dd>
  
  
   <dt id="constant.libxml-html-noimplied">
    <strong><code><a href="libxml.constants.php#constant.libxml-html-noimplied">LIBXML_HTML_NOIMPLIED</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Sets HTML_PARSE_NOIMPLIED flag, which turns off the
     automatic adding of implied html/body... elements.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.7.7 (as of PHP &gt;= 5.4.0)
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-html-nodefdtd">
    <strong><code><a href="libxml.constants.php#constant.libxml-html-nodefdtd">LIBXML_HTML_NODEFDTD</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Sets HTML_PARSE_NODEFDTD flag, which prevents a default doctype
     being added when one is not found.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.7.8 (as of PHP &gt;= 5.4.0)
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-loaded-version">
    <strong><code><a href="libxml.constants.php#constant.libxml-loaded-version">LIBXML_LOADED_VERSION</a></code></strong>
    (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Version of libxml&#039;s core parser module.
    </span>
   </dd>
  
  
   <dt id="constant.libxml-noblanks">
    <strong><code><a href="libxml.constants.php#constant.libxml-noblanks">LIBXML_NOBLANKS</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Remove blank nodes
    </span>
   </dd>
  
  
   <dt id="constant.libxml-nocdata">
    <strong><code><a href="libxml.constants.php#constant.libxml-nocdata">LIBXML_NOCDATA</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Merge CDATA as text nodes
    </span>
   </dd>
  
  
   <dt id="constant.libxml-noemptytag">
    <strong><code><a href="libxml.constants.php#constant.libxml-noemptytag">LIBXML_NOEMPTYTAG</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Expand empty tags (e.g. <code class="literal">&lt;br/&gt;</code> to
     <code class="literal">&lt;br&gt;&lt;/br&gt;</code>)
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      This option is currently just available in the
      <a href="domdocument.save.php" class="xref">DOMDocument::save</a> and
      <a href="domdocument.savexml.php" class="xref">DOMDocument::saveXML</a> functions.
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-noent">
    <strong><code><a href="libxml.constants.php#constant.libxml-noent">LIBXML_NOENT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Substitute entities
    </span>
    <div class="caution"><strong class="caution">Caution</strong>
     <p class="simpara">
      Enabling entity substitution may facilitate XML External Entity (XXE) attacks.
     </p>
    </div>
   </dd>
  
  
   <dt id="constant.libxml-noerror">
    <strong><code><a href="libxml.constants.php#constant.libxml-noerror">LIBXML_NOERROR</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Suppress error reports
    </span>
   </dd>
  
  
   <dt id="constant.libxml-nonet">
    <strong><code><a href="libxml.constants.php#constant.libxml-nonet">LIBXML_NONET</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Disable network access when loading documents
    </span>
   </dd>
  
  
   <dt id="constant.libxml-nowarning">
    <strong><code><a href="libxml.constants.php#constant.libxml-nowarning">LIBXML_NOWARNING</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Suppress warning reports
    </span>
   </dd>
  
  
   <dt id="constant.libxml-noxmldecl">
    <strong><code><a href="libxml.constants.php#constant.libxml-noxmldecl">LIBXML_NOXMLDECL</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Drop the XML declaration when saving a document
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.6.21
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-no-xxe">
    <strong><code><a href="libxml.constants.php#constant.libxml-no-xxe">LIBXML_NO_XXE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Disables XML External Entities (XXE) when performing entity substitution
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.13.0, as of PHP 8.4.0
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-nsclean">
    <strong><code><a href="libxml.constants.php#constant.libxml-nsclean">LIBXML_NSCLEAN</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Remove redundant namespace declarations
    </span>
   </dd>
  
  
   <dt id="constant.libxml-parsehuge">
    <strong><code><a href="libxml.constants.php#constant.libxml-parsehuge">LIBXML_PARSEHUGE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Sets XML_PARSE_HUGE flag, which relaxes any hardcoded limit from the parser. This affects
     limits like maximum depth of a document or the entity recursion, as well as limits of the
     size of text nodes.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.7.0 (as of PHP &gt;= 5.3.2 and PHP &gt;= 5.2.12)
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-pedantic">
    <strong><code><a href="libxml.constants.php#constant.libxml-pedantic">LIBXML_PEDANTIC</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Sets XML_PARSE_PEDANTIC flag, which enables pedantic error reporting.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Available as of PHP &gt;= 5.4.0
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-recover">
    <strong><code><a href="libxml.constants.php#constant.libxml-recover">LIBXML_RECOVER</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Enables recovery mode when parsing a document.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available as of PHP 8.4.0
     </p>
    </p></blockquote>
   </dd>
  
  
   <dt id="constant.libxml-xinclude">
    <strong><code><a href="libxml.constants.php#constant.libxml-xinclude">LIBXML_XINCLUDE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Perform XInclude substitution (only for pull parsers, i.e. <span class="classname"><a href="class.xmlreader.php" class="classname">XMLReader</a></span>).
    </span>
   </dd>
  
  
   <dt id="constant.libxml-err-error">
    <strong><code><a href="libxml.constants.php#constant.libxml-err-error">LIBXML_ERR_ERROR</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     A recoverable error
    </span>
   </dd>
  
  
   <dt id="constant.libxml-err-fatal">
    <strong><code><a href="libxml.constants.php#constant.libxml-err-fatal">LIBXML_ERR_FATAL</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     A fatal error
    </span>
   </dd>
  
  
   <dt id="constant.libxml-err-none">
    <strong><code><a href="libxml.constants.php#constant.libxml-err-none">LIBXML_ERR_NONE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     No errors
    </span>
   </dd>
  
  
   <dt id="constant.libxml-err-warning">
    <strong><code><a href="libxml.constants.php#constant.libxml-err-warning">LIBXML_ERR_WARNING</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     A simple warning
    </span>
   </dd>
  
  
   <dt id="constant.libxml-version">
    <strong><code><a href="libxml.constants.php#constant.libxml-version">LIBXML_VERSION</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     libxml version like 20605 or 20617
    </span>
   </dd>
  
  
   <dt id="constant.libxml-dotted-version">
    <strong><code><a href="libxml.constants.php#constant.libxml-dotted-version">LIBXML_DOTTED_VERSION</a></code></strong>
    (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     libxml version like 2.6.5 or 2.6.17
    </span>
   </dd>
  
  
   <dt id="constant.libxml-schema-create">
    <strong><code><a href="libxml.constants.php#constant.libxml-schema-create">LIBXML_SCHEMA_CREATE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Create default/fixed value nodes during XSD schema validation
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      Only available in Libxml &gt;= 2.6.14 (as of PHP &gt;= 5.5.2)
     </p>
    </p></blockquote>
   </dd>
  
 </dl>
</div>
<?php manual_footer($setup); ?>