Click here to Skip to main content
15,885,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need to create xml file dynamically.I am able to save the data
if i have xml file(aaa.xml) added manually in root folder.

I want to add aaa.xml file to root folder dynamically.can anyone pls
help me how to add xmlfile(aaa.xml) to root folder programatically
Posted

Your question is unclear: do you know how to create an XML file but are getting an error when you try to create it in the root folder, or do you not know how to create an XML file programmatically?

Vista (and, I think, Win7) does not allow applications to create files in the root folder. The proper place to put application specific files is C:\Program Files\(App Name)\.
 
Share this answer
 
Here you go of how to create an XML dynamically at runtime:
Programmatically creating a new XML document[^]
Also make sure you give write permissions to the root folder such that you can create a new aaa.xml in it. :thumbsup:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900