How to implement download of a file

Hello!

I have a menu item. Whenever the user selects it, I want to send to his browser some XML file.

Then, on the client side, the browser will either display that XML, or show a dialog box for saving/opening it in an external application.

How can I implement this sending of a byte stream to the browser?

Thanks in advance

Dmitri

I found some of the answers
here
.

Dmitri