PHP xml_parser_get_option() Function
Example
Get options from an XML parser:
<?php
$parser=xml_parser_create();
echo "XML_OPTION_CASE_FOLDING: " . xml_parser_get_option($parser, XML_OPTION_CASE_FOLDING)
. <br>;
echo "XML_OPTION_TARGET_ENCODING: " . xml_parser_get_option($parser, XML_OPTION_TARGET_ENCODING);
xml_parser_free($parser);
?>
Run Example »
Definition and Usage
The xml_parser_get_option() function gets options from an XML parser.
Syntax
xml_parser_get_option(parser, option)
Parameter Values
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
option | Required. Specifies the option to get. Possible values:
|
Technical Details
Return Value: | The option's value on success. FALSE and an error on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.1: Added XML_OPTION_SKIP_TAGSTART and XML_OPTION_SKIP_WHITE to the option parameter |
❮ PHP XML Parser Reference