To check validity you pass the document through a validating parser which should report any errors it finds. For example,
$ xmllint --valid --noout invalidhotcop.xml invalidhotcop.xml:10: element SONG: validity error : Element SONG content does not follow the DTD, expecting (TITLE , COMPOSER+ , PRODUCER* , PUBLISHER* , LENGTH? , YEAR? , ARTIST+), got (TITLE PRODUCER PUBLISHER LENGTH YEAR ARTIST ) </SONG> ^
A valid document:
$ xmllint --valid --noout validhotcop.xml $