sandeep529 Posted December 28, 2011 Share Posted December 28, 2011 hi all, I was just wondering if anyone know who created the simplexml php library and why is it so complicated when using with namespaces and all... This is a funny writeup with an example http://blog.preinheimer.com/index.php?/archives/172-SimpleXML,-Namespaces-Hair-loss.html So anyone has any idea who created this, and why it is the way it is...? Quote Link to comment https://forums.phpfreaks.com/topic/253932-who-created-simplexml-and-why-is-it-so-complicated/ Share on other sites More sharing options...
trq Posted December 28, 2011 Share Posted December 28, 2011 I'm not sure it's simplexml's fault that soap sux balls. Quote Link to comment https://forums.phpfreaks.com/topic/253932-who-created-simplexml-and-why-is-it-so-complicated/#findComment-1301806 Share on other sites More sharing options...
sandeep529 Posted December 28, 2011 Author Share Posted December 28, 2011 I'm not sure it's simplexml's fault that soap sux balls. SOAP may be justified on the grounds of interoperability or something like that... But I cant think of any reason why SimpleXML is the way it is... Quote Link to comment https://forums.phpfreaks.com/topic/253932-who-created-simplexml-and-why-is-it-so-complicated/#findComment-1301815 Share on other sites More sharing options...
trq Posted December 28, 2011 Share Posted December 28, 2011 I don't really see it as being difficult. Must things get more difficult as you make them more flexible. if you wan't simplicity, you need to be willing to give up functionality. Quote Link to comment https://forums.phpfreaks.com/topic/253932-who-created-simplexml-and-why-is-it-so-complicated/#findComment-1301817 Share on other sites More sharing options...
sandeep529 Posted December 28, 2011 Author Share Posted December 28, 2011 I don't really see it as being difficult. Must things get more difficult as you make them more flexible. if you wan't simplicity, you need to be willing to give up functionality. That is not always true...right? Do you really think the CDATA(does it even support it?) and namespaces must be handled the way simplexml does now? Quote Link to comment https://forums.phpfreaks.com/topic/253932-who-created-simplexml-and-why-is-it-so-complicated/#findComment-1301828 Share on other sites More sharing options...
Adam Posted December 28, 2011 Share Posted December 28, 2011 Since the more robust DOM extension also requires you to provide the URI of the namespace, not the namespace prefix, I'm guessing there's a reason. What comes to mind is probably that you can define a namespace for a sub-element without a prefix, that would make it impossible to distinguish one from the other. So my guess is it's to prevent any ambiguity. Quote Link to comment https://forums.phpfreaks.com/topic/253932-who-created-simplexml-and-why-is-it-so-complicated/#findComment-1302023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.