XML checking script

This PR closes old issue 26.