magp.ie
Check for Valid XML with PHP
Simple function to check if XML is valid. It just loads the XML into DOMDocument and checks for errors.