I have this as xml:
&
Having worked a lot with simplexml, this is how I do it.
The magic trick if you already have an element and just want to get it's different namespaced children, say for a structure like this:
My test entry
A type
Is to send TRUE as the second parameter to the children function:
$title = (string) $entry->title;
$gd = $entry->children('gd', TRUE);
$attrs = $gd->when->attributes();
$startTime = (string) $attrs->startTime;
$gc = $entry->children('gc', TRUE);
$notes = (string) $gc->notes();