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

Online Tools

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

Object Functions

    PHP XML Function Manual

    PHP xml_parser_create_ns() Function Usage and Example

The xml_parser_create_ns() function is used to create an XML parser with namespace support.

Syntax

resource xml_parser_create_ns ([ string $encoding [, string $separator = ":" ]])

Definition and Usage

It is used to create an XML parser with namespace support

Return Value

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

ParameterSerial Number
1

Parameter and Description

encoding 5.0.2 Optional. Specify the output encoding. In PHP-8.

and above versions, the default is UTF

  • Possible values:-8859-1

  • ISO-8

  • UTF-US

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

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

2

separator

The output delimiter for the specified tag name and namespace. The default is " : ".

PHP XML Function Manual