Hey everyone
I have this code:
<root>
<news>
<item id="1" headline="I am a headline">
<item id="2" headline="I am also a headline">
<item id="3" headline="again, I'm a headline">
</news>
</root>
I want to use DOM to read the id-attribute of the last child.
I want to do kind of this:
$id = $dom->documentElement->getElementsByTagName('news')->lastChild->getAttribute("id");
It doesn't work... How do I do that?