Using JQuery to create an XML file.

Using JQuery to create an XML file.

I have a project where we are using JqueryUI to display an droppable element on the page and harvest the selection of the element once  a user hits submit. We want to use JQuery update an XML file once the selection has been submitted. I would like to find an example or reference point online, but couldn't find any. Can someone steer me in the right direction.