deepmoteria
deepmoteria

Reputation: 2441

How to create a xml file on the client machine using javascript or jquery

How to create a xml file on the client machine using javascript or jquery. I need to write the xml file on the clients machine from my web application using javascript or jquery. How can i do so? and need it for atleast 3 browsers Firefox,Chrome and IE8+

Upvotes: 2

Views: 1376

Answers (2)

deepmoteria
deepmoteria

Reputation: 2441

We can use signed applet to write any file on the client side using your application. This is one of the best solution i have got till now.

Upvotes: 1

Sjoerd
Sjoerd

Reputation: 75639

Creating files on the client side is not well supported in many browsers. The trick is to generate a string containing your XML, then encode it using base64 encoding, and redirect the browser to a data: URL which contains this base64 encoded data.

It is easier to create your file on the server and let the user download it.

Upvotes: 1

Related Questions