File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
xml /
tests /
xml007.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:05 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
xml_parse_into_struct/umlauts in tags
--SKIPIF--
<?php // vim600: syn=php
include("skipif.inc");
if(strtoupper("δφόί") != "ΔΦάί")
{
die("skip strtoupper on non-ascii not supported on this platform");
}
?>
--FILE--
<?php
function startHandler($parser,$tag,$attr)
{
var_dump($tag,$attr);
}
function endHandler($parser,$tag)
{
var_dump($tag);
}
$xmldata = '<?xml version="1.0" encoding="ISO-8859-1"?><δφό όδί="άδί">ΔΦά</δφό>';
$parser = xml_parser_create('ISO-8859-1');
xml_set_element_handler($parser, "startHandler", "endHandler");
xml_parse_into_struct($parser, $xmldata, $struct, $index);
var_dump($struct);
?>
--EXPECT--
string(3) "ΔΦά"
array(1) {
["άΔί"]=>
string(3) "άδί"
}
string(3) "ΔΦά"
array(1) {
[0]=>
array(5) {
["tag"]=>
string(3) "ΔΦά"
["type"]=>
string(8) "complete"
["level"]=>
int(1)
["attributes"]=>
array(1) {
["άΔί"]=>
string(3) "άδί"
}
["value"]=>
string(3) "ΔΦά"
}
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>