Edit report at https://bugs.php.net/bug.php?id=55171&edit=1

 ID:                 55171
 Updated by:         [email protected]
 Reported by:        xryuku at hotmail dot co dot uk
 Summary:            XML tags are meant to be case sensitive - but PHP
                     displays them in all caps
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            *XML functions
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is function of libxml not PHP.


Previous Comments:
------------------------------------------------------------------------
[2011-07-10 16:33:45] xryuku at hotmail dot co dot uk

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 this bug report at https://bugs.php.net/bug.php?id=55171&edit=1

Reply via email to