35 $charData =
'<b>c</b>';
36 $xml =
'<a>' . htmlspecialchars( $charData ) .
'</a>';
39 xml_set_character_data_handler(
$parser, [ $this,
'chardata' ] );
40 $parsedOk = xml_parse(
$parser, $xml,
true );
41 $this->ok = $parsedOk && ( $this->parsedData == $charData );