PHP xml_parser_get_option() Function

Description

The xml_parser_get_option() function gets options from an XML parser.

Syntax

PHP xml_parser_get_option() Function has the following syntax.

xml_parser_get_option(parser,option,value)

Parameter

ParameterIs RequiredDescription
parserRequired.XML parser to use
optionRequired.option to get.

Possible values for option:

  • XML_OPTION_CASE_FOLDING - Specifies if case-folding is enabled. Enabled by default. Can be 1 (TRUE) or 0 (FALSE)
  • XML_OPTION_TARGET_ENCODING - Specifies which target encoding to use in this XML parser. By default, it is set to the same as the xml_parser_create() function. Supported target encodings are ISO-8859-1, US-ASCII and UTF-8.

Return

This function returns the options value on success, or FALSE and an error on failure.

Example

Get options from an XML parser


<?php//w w  w. j  a va  2s . c om
$xmlparser = xml_parser_create();

echo xml_parser_get_option($xmlparser, XML_OPTION_CASE_FOLDING);

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