Validation of XML with XmlSimple

My application needs to check whether a file contains valid XML. I'm
using XmlSimple to do the parsing work but wondered how best to validate
the XML in the file I'm parsing.

I'd appreciate your input.

I also need to do validation please advise

http://stackoverflow.com/questions/1007454/validation-of-xml-file-against-xsd-in-ruby

xmlsimple can't do validations using xsd/dtd etc

tom