Annotation of embedaddon/php/ext/xml/tests/xml007.phpt, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>