Current Location: Home> Function Categories> xml_parser_set_option

xml_parser_set_option

Set options in XML parser
Name:xml_parser_set_option
Category:XML parser
Programming Language:php
One-line Description:Set options in the XML parser.

Definition and usage

xml_parser_set_option() function is used to set options in the XML parser.

Example

Set an option in the XML parser:

 <?php
$parser = xml_parser_create ( ) ;

xml_parser_set_option ( $parser , XML_OPTION_CASE_FOLDING , 0 ) ;

xml_parser_free ( $parser ) ;
?>

grammar

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

Required. Specify the options to set. Possible values ​​include:

  • XML_OPTION_CASE_FOLDING - Specifies whether to enable case collapse.
    (Can be 1 (TRUE) or 0 (FALSE). The default is 1.)
  • 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))
  • 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))
value Required. Specifies the new value for the option.
Similar Functions
Popular Articles