xref: /php-src/ext/xml/tests/xml007.phpt (revision 8567bc10)
1--TEST--
2xml_parse_into_struct/umlauts in tags
3--EXTENSIONS--
4xml
5--SKIPIF--
6<?php
7if(strtoupper("����") != "����")
8{
9    die("skip strtoupper on non-ascii not supported on this platform");
10}
11?>
12--FILE--
13<?php
14function startHandler($parser,$tag,$attr)
15{
16    var_dump($tag,$attr);
17}
18
19function endHandler($parser,$tag)
20{
21    var_dump($tag);
22}
23
24$xmldata = '<?xml version="1.0" encoding="ISO-8859-1"?><��� ���="���">���</���>';
25$parser = xml_parser_create('ISO-8859-1');
26xml_set_element_handler($parser, "startHandler", "endHandler");
27xml_parse_into_struct($parser, $xmldata, $struct, $index);
28var_dump($struct);
29?>
30--EXPECT--
31string(3) "���"
32array(1) {
33  ["���"]=>
34  string(3) "���"
35}
36string(3) "���"
37array(1) {
38  [0]=>
39  array(5) {
40    ["tag"]=>
41    string(3) "���"
42    ["type"]=>
43    string(8) "complete"
44    ["level"]=>
45    int(1)
46    ["attributes"]=>
47    array(1) {
48      ["���"]=>
49      string(3) "���"
50    }
51    ["value"]=>
52    string(3) "���"
53  }
54}
55