Agreed this would be the simplest method.
However if you are using an exterior webhost who won't install any exts for you, or not running php5, then the class I showed you would work.
I would try to get your feet wet with the class I had linked, its VERY basic, but it may work.
<?php
$xmlArray = &new assoc_array2xml;
$xmlfile = "my_uploaded_file.xml";
$x_array = $xmlArray->xml2array($xmlfile);
printf("<pre>%s</pre>",print_r($x_array,true));
?>
This (should) give you an output of the array form. I would use a properly formatted XML file for starters. You will be able to pull data from this xml file and validate just like you would any other php array.
I'm @ work so I can't test anything, so I have no idea if it works, but this should get you started. If you are unfamiliar with OOP, there are tutorials on this site (phpbuilder.com).