As the title implies, I want to inspect the complete config XML tree generated by Magento.
I have looked at the config object and cannot see a way to do this.
How can this be done?
To get the config xml in its entirety (as xml which is what I assume you are referring to)...
Mage::app()->getConfig()->getXmlString();
It will be much easier to inspect if you save it to a file. The following will save to a file at var/tmp/configxml.xml...
file_put_contents(Mage::getBaseDir('tmp').DS.'configxml.xml', Mage::app()->getConfig()->getXmlString());
Obviously, Magento has to have been bootstrapped first.
I figured this would come in handy so I built a tiny Magento module that will show the config if you add ?showConfig=1 to the URL. Props to Drew Hunter for the initial code.
https://github.com/siliconrockstar/showconfig
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With