<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = 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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.xml-parser-create.php',
    1 => 'xml_parser_create',
    2 => 'Create an XML parser',
  ),
  'up' => 
  array (
    0 => 'ref.xml.php',
    1 => 'XML Parser Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.xml-parse-into-struct.php',
    1 => 'xml_parse_into_struct',
  ),
  'next' => 
  array (
    0 => 'function.xml-parser-create-ns.php',
    1 => 'xml_parser_create_ns',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/xml/functions/xml-parser-create.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.xml-parser-create" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xml_parser_create</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">xml_parser_create</span> &mdash; <span class="dc-title">Create an XML parser</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.xml-parser-create-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>xml_parser_create</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">$encoding</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="class.xmlparser.php" class="type XMLParser">XMLParser</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>xml_parser_create()</strong></span> creates a new XML parser
   and returns a <span class="classname"><a href="class.xmlparser.php" class="classname">XMLParser</a></span> instance to be used by the
   other XML functions.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.xml-parser-create-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">encoding</code></dt>
     <dd>
      <p class="para">
       The input
       encoding is automatically detected, so that the
       <code class="parameter">encoding</code> parameter specifies only the output
       encoding. If empty string is passed, the parser attempts to identify
       which encoding the document is encoded in by looking at the heading 3 or
       4 bytes. The default output charset is UTF-8. The supported
       encodings are <code class="literal">ISO-8859-1</code>, <code class="literal">UTF-8</code> and
       <code class="literal">US-ASCII</code>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.xml-parser-create-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns a new <span class="classname"><a href="class.xmlparser.php" class="classname">XMLParser</a></span> instance.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.xml-parser-create-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
      This function returns an <span class="classname"><a href="class.xmlparser.php" class="classname">XMLParser</a></span> instance now;
      previously, a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was returned, Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">encoding</code> is nullable now.       
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.xml-parser-create-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.xml-parser-create-ns.php" class="function" rel="rdfs-seeAlso">xml_parser_create_ns()</a> - Create an XML parser with namespace support</span></li>
   </ul>
  </p>
 </div>


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