The thing to keep in mind is that PHP runs on the server, where as the HTML and display runs on the client (browser), so anytime you want to pass information back and forth (in this case, the file name to parse, and the parsed and formatted document) you need to either go to a separate page, or use AJAX to do the request asynchronously.
I'll leave it up to you to parse and format the XML however you see fit, but this should get you started:
<?php
$file = $_GET['file'];
if (!empty($file)) {
$xml = load_xml($file);
$parsed = parse_xml($xml);
$formatted = format_xml($parsed);
} else {
$formatted = "";
}
?>
<html>
<head><title>Sample XML Picker</title></head>
<body>
<ul class="list_of_documents">
<li><a href="<?php echo $_SERVER['PHP_SELF']?>?file=File1.xml">File1.xml</a></li>
...
</ul>
<div class="results">
<?php echo $formatted ?>
</div>
</html>
This links to itself, but with a query string indicating which file to load. At the very beginning, we check to see if that file variable is set, and if it is, go ahead and load, parse, and format the xml. Note that those functions are just stubs for you to fill in with whatever method you choose.