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

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP xml_parser_create_ns() function usage and example

    PHP XML Function Manual

    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 failed, it returns FALSE.

Parameter

Serial numberParameters and descriptions
1

encoding

Optional. 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 The input encoding is automatically detected. In PHP 4 and earlier versions, this parameter specifies the character encoding for input and output. In

Note:In PHP 5.0.0 and 5.0.1 In, 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