Latest web development tutorials

PHP xml_parser_get_option () function

PHP XML Reference Complete PHP XML Reference

Definition and Usage

xml_parser_get_option () function to get options from an XML parser.

If successful, the function returns the value of the option. If it fails, FALSE, and an error is returned.

grammar

xml_parser_get_option(parser,option,value)

参数 描述
parser 必需。规定要使用的 XML 解析器。
option 必需。规定要获取的选项。可能的值:
  • XML_OPTION_CASE_FOLDING - 规定是否允许 case-folding。默认为允许。可以是 1(TRUE)或 0(FALSE)。
  • XML_OPTION_TARGET_ENCODING - 规定在 XML 解析器中使用哪个目标编码。默认情况下,它和xml_parser_create()函数的设置是相同的,它支持的目标编码是:ISO-8859-1、US-ASCII 和 UTF-8。


Examples

<?php
$xmlparser = xml_parser_create();

echo xml_parser_get_option($xmlparser, XML_OPTION_CASE_FOLDING);

xml_parser_free($xmlparser);
?>


PHP XML Reference Complete PHP XML Reference