Load and send a Custom SAML Response

I created a service provider following the demo MvcExampleServiceProvider project.
As Identity Provider i use MvcExampleIdentityProvider project (modified to call my service provider).
I would like to load a custom SAML.xml document and send it as response:
SAMLIdentityProvider.SendSSO(Response, userName, attributes);

Is it possible?
Thank you.

Hi Fabio
This is possible using the SAML low-level API but not recommended.
The reason for this is that you would have to turn off a number of security checks to have the SAML response processed successfully.
These are to do with time-related validity periods, replay attacks etc. If you update these you would then need to regenerate the XML signature.
You should be able to call SAMLIdentityProvider.SendSSO to include whatever user name and SAML attributes you require.
Other details such as what is signed etc are controlled through configuration.
And information, such as IDs, time values etc are set automatically by our code.