Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.4

Bug #1367 XML tags are converted to lowercase
Submitted: 2004-05-07 20:06 UTC
From: patrick dot lambert at noggin dot com Assigned: neokod
Status: Closed Package: XML_FastCreate
PHP Version: 4.3.4 OS: Solaris 9
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2004-05-11 13:18 UTC
Package:
Bug Type:
Summary:
From: patrick dot lambert at noggin dot com
New email:
PHP Version: Package Version: OS:

 

 [2004-05-07 20:06 UTC] patrick dot lambert at noggin dot com
Description: ------------ Upper or mixed-case XML tags are converted to lowercase. Reproduce code: --------------- $x =& new XML_FastCreate_Text(); $x->outer( $x->INNER('foo') ); $x->toXML(); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <outer> <INNER>foo</INNER></outer> Actual result: -------------- <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <outer> <inner>foo</inner></outer>

Comments

 [2004-05-07 20:53 UTC] guillaume dot lecanu at online dot fr
Thank you for taking the time to write to us, but this is not a bug. The PHP overload system don't return the correct case of the method called. I search a solution, but you can temporaly use the translation option to bypass this bug. Ex: $x =& new XML_FastCreate_Text( array( 'translate' => array( 'inner' => array('INNER') ) ) ); $x->outer( $x->INNER('foo') ); $x->toXML(); This exemple return the expected result.
 [2004-05-11 13:18 UTC] guillaume dot lecanu at online dot fr
In PHP function/method names are case-insensitive, so they all get auto-converted to lowercase. Cf. : http://bugs.php.net/bug.php?id=21463 If you really need uppercase in XML you can use the translation option. $x =& new XML_FastCreate_Text( array( 'translate' => array( 'upper' => array('UPPER') ) ) ); $x->UPPER() $x->toXML();