The example code seems to be reliant on the XML returned having 'dxp' as the namespace qualifier. So I think this approach taken may fail if either:

a) The namespace qualifier is changed to something other than 'dxp'
b) No namespace qualifiers are used at all, e.g. all the tags have the xmlns explicitly set.

However SimpleXML seems to allow you to assert that 'dxp' is the namespace qualifier by using registerXPathNamespace() so that you can use XPath to find the nodes you want.

SimpleXML is all very well for PHP devotees. I personally I prefer to use DOM, as it's well thought out cross-language API. DOM supports useful functions like getElementsByTagNameNS() which does the job for you.