<?php $simple_element = simplexml_load_file("data.xml"); foreach ( $simple_element->newsitem as $item ) { print "<b>{$item->headline}</b><br />\n"; print "<i>{$item->byline}</i><br />\n\n"; } ?>