array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.xml-parser-create.php', 1 => 'xml_parser_create', ), 'up' => array ( 0 => 'ref.xml.php', 1 => 'XML パーサ 関数', ), 'prev' => array ( 0 => 'function.xml-parser-create-ns.php', 1 => 'xml_parser_create_ns', ), 'next' => array ( 0 => 'function.xml-parser-free.php', 1 => 'xml_parser_free', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/xml/functions/xml-parser-create.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
xml_parser_create — XML パーサを作成する
xml_parser_create() は新しい XML パーサを作成し、 他の XML 関数が使用する XMLParser のインスタンスを返します。
encoding
入力のエンコーディングは
自動判定されるので、encoding
パラメータは
出力のエンコーディングのみを指定することになります。
もし空の文字列が渡された場合、先頭の 3 あるいは 4 バイトの内容をもとに
パーサがエンコーディングの判別を試みます。
ではデフォルトの出力文字セットは UTF-8 です。
サポートされるエンコーディングは
ISO-8859-1
、UTF-8
および
US-ASCII
です。
新しい XMLParser のインスタンスを返します。