Current Location: Home> Function Categories> xml_parser_create_ns

xml_parser_create_ns

Create an XML parser with namespace support
Name:xml_parser_create_ns
Category:XML parser
Programming Language:php
One-line Description:Create an XML parser that supports namespaces.

Definition and usage

The xml_parser_create_ns() function creates an XML parser that supports namespaces.

Tip: To release the XML parser, use xml_parser_free() function.

Tip: To create an XML parser that does not support namespaces, use xml_parser_create() function instead.

Example

Create an XML parser that supports namespaces:

 <?php
// Create an XML parser that supports namespaces
$parser = xml_parser_create_ns ( ) ;

xml_parser_free ( $parser ) ;
?>

grammar

 xml_parser_create ( encoding , separator )
parameter describe
encoding

Optional. Specify the character encoding for input/output in PHP 4. Starting with PHP 5, only the character encoding of the output is specified.

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

Starting with PHP 5.0.2, the default output character set is UTF-8. Possible values ​​are ISO-8859-1, UTF-8, and US-ASCII.

separator Optional. Specifies the output separator for the label name and namespace. The default is ":".
Similar Functions
Popular Articles