YouTip LogoYouTip

Func Xml Parser Create

```html PHP xml_parser_create() Function | Rookie Tutorial

PHP xml_parser_create() Function | Rookie Tutorial

Rookie Tutorial -- Learning is not just technology, but also dreams!

PHP Tutorial

PHP Forms

PHP Advanced Tutorial

PHP 7 New Features

PHP Database

PHP xml_parser_create() Function

Definition and Usage

xml_parser_create() creates an XML parser and returns an xml parser resource handle for use by other XML functions.

Tip: Use xml_parser_free() to release the parser resource after use.

Syntax

xml_parser_create(encoding)
Parameter Description
encoding Optional. Specifies the character encoding for the input. The following values are supported:
  • "UTF-8" (default)
  • "ISO-8859-1"
  • "US-ASCII"

Technical Details

Return Value: Returns a resource handle for the XML parser, or FALSE on failure.
PHP Version: 4.0+

Example

<?php
$parser=xml_parser_create();

// ... other XML functions ...

xml_parser_free($parser);
?>
```
← Func Xml Parser FreeFunc Xml Parser Create Ns β†’