Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to store the xml in a vb.net project. i will use that xml to both read and "WRITE" data into it.

i have tried storing my xml as an embedded resource but u cant edit an embedded resource. :(

Please suggest some other way of storing that XML.

Thanks,
Tarun
Posted

1 solution

You could simply write the XML to file....

In one of my projects I use an XML file for storing custom settings, it simply get read from and written to a file in the application path. However, you may want to store in a users profile somewhere.

Basically, you can store it anywhere you want, providing the account the application is being run under has read/write access for the chosen file system location.
 
Share this answer
 
Comments
Tarun.K.S 12-Oct-10 8:06am    
hmmm right, i can store that xml file in the end user's computer on installing and do reading and writing from that stored file itself.
i just hav to make sure that the end-user doesnt access and make changes to it!
Thanks a lot DaveAuld! :)
DaveAuld 12-Oct-10 8:42am    
If you don't want them to modify the file, then you could pass the xml through some encryption as you write it out to disk.
Tarun.K.S 12-Oct-10 9:46am    
yeah i would definitely do that!
Thanks!!
Tarun.K.S 18-Oct-10 6:25am    
hi, i found another way to store the XML. I can set the build action of my XML file as a content file and set its "Copy to Output Directory" as "Always Copy". So the XML file gets copied to the Bin of the project and i can update my XML there itself. Whats your say on this?

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