Save File As

I’m aware that javascript is incapable of generating a file and presenting it to the user as a download (feel free to correct me if i’m wrong. What alternatives might exist to allow this functionality:
XML text embed in html document (hidden). The xml will be grabbed from the source, formatted as an xml file, and presented to the user as a downloadable file.

Some of my goals for developing this functionality are:
-To have a completely stand-alone product. Meaning, I can offer this simulated file download from within a .html page with no internet connection. So a user downloads this html page and can save it to their dekstop. They can then utilize all its functionality (including xml download - which is really just a fancy export feature) without an internet connection.

The two ways you would normally handle this are via a server-side language or an API (http download). However, neither of these approaches are possible because they require a server and/or an internet connection.

I posted this in the javascript forum in hopes that other javascript developers my have found an alternative to javascript ot combat this limitation in javascript. I’d appreciate any suggestions on this topic, I feel like I’ve exhausted all of my ideas.