Your question is more complex than it would be at first. Let me break it into two parts:
- Is it possible to create a file using javascript?
- Is it possible to write XML to this file using jQuery / javascript?
Unfortunately, the answer to the first question is no. You cannot use javascript in a browser to access the file system. This has security implications and will not be permitted by major browsers.
The answer to the first question makes the second controversial. You can create XML in javascript, but you have nowhere to write.
If you provide more information about the reason you want to do this, you may be able to find alternative solutions to your problem.
source share