Current Location: Home> Function Categories> xml_parser_get_option

xml_parser_get_option

Get options from XML parser
Name:xml_parser_get_option
Category:XML parser
Programming Language:php
One-line Description:Return options from XML parser.

Definition and usage

xml_parser_get_option() function is used to obtain options from the XML parser.

Example

Get options from the 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 the instance

grammar

 xml_parser_get_option ( parser , option )
parameter describe
parser Required. Specifies the XML parser to use
option

Required. Specify the option to obtain. Possible values:

  • XML_OPTION_CASE_FOLDING - Specifies whether to enable case collapse.
    (Can be 1 (TRUE) or 0 (FALSE). The default is 1.)
  • XML_OPTION_TARGET_ENCODING - Specifies the target encoding for this XML parser.
    (The default is the same as the xml_parser_create() function (ISO-8859-1, US-ASCII, or UTF-8))
  • XML_OPTION_SKIP_TAGSTART - Specifies the number of characters to skip at the beginning of the tag name
  • XML_OPTION_SKIP_WHITE - Specifies whether to skip values ​​composed of whitespace characters.
    (can be 1 (TRUE) or 0 (FALSE))
Similar Functions