Bug #55171 [Opn->Bgs]: XML tags are meant to be case sensitive - but PHP displays them in all caps
| From: | iliaa@php.net | Date: | Mon, 11 Jul 2011 16:54:17 +0000 |
| Subject: | Bug #55171 [Opn->Bgs]: XML tags are meant to be case sensitive - but PHP displays them in all caps | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161802@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55171&edit=1
ID: 55171
Updated by: iliaa@php.net
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