PHP xml_parser_create() Function

Description

The xml_parser_create() function creates an XML parser.

Syntax

PHP xml_parser_create() Function has the following syntax.

xml_parser_create(encoding)

Parameter

ParameterIs RequiredDescription
encodingOptional.Output encoding. Default is UTF-8

Possible values:

  • ISO-8859-1
  • UTF-8
  • US-ASCII.

Return

This function returns a resource handle to be used by other XML functions on success, or FALSE on failure.

Example

Create an XML parser


<?php/*  w  w  w .  ja v a 2s  . c om*/
$xmlparser = xml_parser_create();

xml_parser_free($xmlparser);
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions