ZF-7010: Provide element name and allow same node in Zend_Config_Xml

Issue Type: Bug Created: 2009-06-14T07:36:27.000+0000 Last Updated: 2009-11-19T12:32:42.000+0000 Status: Resolved Fix version(s): Reporter: Markus Thielen (mthielen) Assignee: Rob Allen (rob) Tags: - Zend_Config

Related issues: - ZF2-10



  • Would be good to be able to access the node name in a Zend_Config_Xml loaded Zend_Config
  • Zend_Config is very inconsistent when it comes to having same node names like: </mynodes vs.

In the second case Zend_Config flattens the xml. As a result there is no way for a programmer to figure out if "mynode" is one subelement - where there could be many of them - or if its an attribute. Using foreach() results in iterating either over 2 "mynode" elements (in the first case) or over the attributes/subnodes of "mynode" in the second case!

I know its a restriction in Zend_Config_Xml and one should use different node names within node containers, but actually its very common to have this type of XML so the XML can be validated against XSD/DTD and is a lot easier to understand. As there is also no way to access the node name there is absolutely no use to have different node names. I'm really surprised to see that behavior. Is there any way of having this fixed?


Posted by Rob Allen (rob) on 2009-11-19T12:32:42.000+0000

Duplicate of ZF-6109

Have you found an issue?

See the Overview section for more details.


© 2006-2021 by Zend by Perforce. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.