English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP xml_parser_create() Function Usage and Example

    PHP XML Function Manual

    The xml_parser_create() function is used to create an XML parser.

Syntax

xml_parser_create(encoding)

Definition and Usage

It is used to create an XML parser.

Return Value

If successful, this function returns a resource handle that can be used by other XML functions. If it fails, it returns FALSE.

Parameter

NumberParameters and Description
1

encoding

specify the output encoding. In PHP 5.0.2 and above versions, the default is UTF-8.

Possible values:

  • ISO-8859-1

  • UTF-8

  • US-ASCII.

Note:In PHP 5 In it, the input encoding is automatically detected. In PHP 4 and earlier versions, this parameter specifies the input and output character encoding.

Note:In PHP 5.0.0 and 5.0.1 In it, the default output character set is ISO-8859-1.

Online Example

Try the following example to create an XML parser

<?php
   $local = xml_parser_create();
   xml_parser_free($local);
?>
Test and see‹/›

PHP XML Function Manual