Dear All,
I want to develop an extension that somehow it has to write a string to
a xml file. How can I do that? because I have to save some kind of
options that user chooses.

Do I have to use XPCOM? if so, Could you please provide an example?
I did search in google, someone says that I cannot use javascript to
save a file at client-side.