mysql stored procedure - validate input xml
===

I have a mysql stored procedure that takes TEXT input which is supposed to contain an XML. 

I could successfully parse XML and do everything needed. Now that I am working on error handling part, I need to know how to make sure that the input XML is well formed and valid ?

Thanks