I'm trying to display an image using an xml file and SimpleXML
The XML code is
<icons>
<icon size="tiny" href="/FF02-tiny.jpg" />
<icon size="sidebar" href="/FF02-sidebar.jpg" />
<icon size="full" href="/FF02-full.jpg" />
</icons>
I want to get the href
attribute for the size="full"
line.
I've tried
icons->icon->attributes()->href
but this just gives me the first 'tiny'
size. I know I should be using xpath but I am lost.