TechniqueUse the xml_parser_set_option() and the xml_parser_get_option() functions: <?php $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); // defaults to 1 xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); // defaults to ISO-8859-1 $skip_white = xml_parser_get_option($parser, XML_OPTION_SKIP_WHITE); ?> CommentsYou can get and set four options by using the xml_parser_get_option() and xml_parser_set_option() functions. Here is a list of the constants and their values:
These four constants are the only things that you can set, but the rest of the XML API is pretty flexible, so you shouldn't have to worry about not having enough flexibility or power. |