function cc::xml_create_parser in Constant Contact 6.3
Same name and namespace in other branches
- 6.2 class.cc.php \cc::xml_create_parser()
- 7.3 class.cc.php \cc::xml_create_parser()
* Return XML parser, and possibly re-encoded source * * @access private
1 call to cc::xml_create_parser()
- cc::xml_to_array in ./
class.cc.php - * This method will convert a string comtaining XML into a nicely formatted PHP array * * @access private
File
- ./
class.cc.php, line 1700
Class
- cc
- @file
Code
function xml_create_parser($source, $out_enc, $in_enc, $detect) {
if (substr(phpversion(), 0, 1) == 5) {
$parser = $this
->xml_php5_create_parser($in_enc, $detect);
}
else {
list($parser, $source) = $this
->xml_php4_create_parser($source, $in_enc, $detect);
}
if ($out_enc) {
$this->xml_encoding = $out_enc;
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $out_enc);
}
return array(
$parser,
$source,
);
}