Resolve namespaces with SimpleXML regardless of structure or namespace
I got a Google Shopping feed like this (extract): <?xml version="1.0" encoding="utf-8" ?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> ... <g:id><![CDATA[Blah]]></g:id> <title><![CDATA[Blah]]></title> <description><![CDATA[Blah]]></description> <g:product_type><![CDATA[Blah]]></g:product_type> Now, SimpleXML can read the "title" and "description" tags but it can't read the tags with "g:" prefix. There are solutions on stackoverflow for this specific case, using the "children" function. But I don't only want to read Google Shopping XMLs, I need it to be undependend from structure