I post my solution:
ALTER PROCEDURE [dbo].[spValidateXMLInvDocByXML] (@XML XML, @stringXML NVARCHAR(MAX) output)
AS BEGIN
SET NOCOUNT ON
DECLARE @x XML(dbo.invoicesDoc)
BEGIN TRY
SET @x = @XML;
END TRY
BEGIN CATCH
SET @stringXML = ERROR_MESSAGE();
END CATCH
RETURN;
END