Jump to content

Recommended Posts

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...?

 

 

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?

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.