From:             
Operating system: 
PHP version:      5.3.6
Package:          *XML functions
Bug Type:         Bug
Bug description:XML tags are meant to be case sensitive - but PHP displays them 
in all caps

Description:
------------
---
>From manual page: http://www.php.net/book.xml
---

When using xml_parse_into_struct(), the [tag] value of each array is in all
caps, 
when XML is meant to be case sensitive, as noted here:
http://www.w3schools.com/xml/xml_syntax.asp

Therefore, tags should be the same in PHP as they are in the XML.

Test script:
---------------
<?php

XML_Parse_Into_Struct(XML_Parser_Create(),
File_Get_Contents('XML/Home.xml'), $XML);


Print_R($XML);

Expected result:
----------------
Array
(
    [0] => Array
        (
            [tag] => Trezu
            [type] => open
            [level] => 1
            [value] => 
        
        )
 
    [1] => Array
        (
            [tag] => Title
            [type] => complete
            [level] => 2
            [value] => Trezu
        )
 
    [2] => Array
        (
            [tag] => Trezu
            [value] => 
        
            [type] => cdata
            [level] => 1
        )
 
    [3] => Array
        (
            [tag] => Content
            [type] => complete
            [level] => 2
            [value] => 
                                *content here* 
        
        )
 
    [4] => Array
        (
            [tag] => Trezu
            [value] => 
 
            [type] => cdata
            [level] => 1
        )
 
    [5] => Array
        (
            [tag] => Trezu
            [type] => close
            [level] => 1
        )
 
)

Actual result:
--------------
Array
(
    [0] => Array
        (
            [tag] => TREZU
            [type] => open
            [level] => 1
            [value] => 
        
        )
 
    [1] => Array
        (
            [tag] => TITLE
            [type] => complete
            [level] => 2
            [value] => Trezu
        )
 
    [2] => Array
        (
            [tag] => TREZU
            [value] => 
        
            [type] => cdata
            [level] => 1
        )
 
    [3] => Array
        (
            [tag] => CONTENT
            [type] => complete
            [level] => 2
            [value] => 
                                *content here* 
        
        )
 
    [4] => Array
        (
            [tag] => TREZU
            [value] => 
 
            [type] => cdata
            [level] => 1
        )
 
    [5] => Array
        (
            [tag] => TREZU
            [type] => close
            [level] => 1
        )
 
)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55171&edit=1
-- 
Try a snapshot (PHP 5.2):            
https://bugs.php.net/fix.php?id=55171&r=trysnapshot52
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55171&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55171&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55171&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55171&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55171&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55171&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55171&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55171&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55171&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55171&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55171&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55171&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55171&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55171&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55171&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55171&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55171&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55171&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55171&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55171&r=mysqlcfg
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55171&r=trysnapshot54

Reply via email to