Verify XML file syntax on a console using Python

Put the following code in a file, for example

import xml.dom.minidom as dom
dom.parse ('test.xml')

And make it executable: chmod 755

If you execute ./, if your xml file test.xml is correct, it should output nothing, else it outputs an error!

Of course this script may be improved, for example to take the xml file as parameter ..