UPDATE: I\'ve reworked the question, to show progress I\'ve made, and maybe make it easier to answer.
UPDATE 2: I\'ve added another value to the XML. Extension avail
You haven't explained what you're seeing wrong, exactly, so I'm going to have to guess.
First, in your source, your last DownloadPath is /this/windows/3/1.zip
even though it's supposed to be a Mac file - mis-type, I'm sure, but the output will "look wrong" with that there.
Next, if you want strings rather than SimpleXMLElement Objects, you need this (also done some tidying to avoid so many stripslashes()
calls):
foreach ($xml->Item as $file) {
$platform = stripslashes((string) $file->Platform);
$name = stripslashes((string) $file->Name);
$title = stripslashes((string) $file->Title);
if( !isset($groups[$platform][$name][$title])) {
$groups[$platform][$name][$title] = array(
'Platform' => $platform,
'Name' => $name,
'Title' => $title
);
}
$groups[$platform][$name][$title]['Files'][] = (string) $file->DownloadPath;
}
Notice the (string)
bits? They cast the object to a string, which allows you access to the literal value rather than the object. This is also the reason why your array keys worked, because they were internally cast to strings (only strings and integer may be used as array keys).
I think that's all I can find that might answer your question. If it isn't please let me know more clearly what's wrong and I'll be happy to try and help.