i was trying to check the validity of a string as xml using this [`simplexml_load_string()`*Docs*](http://php.net/simplexml_load_string) function but it displays a lot of warning messages.

How can I check whether a string is a valid XML without suppressing ([`@` at the beginning](http://php.net/language.operators.errorcontrol)) the error **and** displaying a warning function that expec