Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I do save my form in xml file and my form has component.
how can do this? how can save my component in xml file?
please help me.
Posted
Comments
thatraja 20-Nov-11 4:24am    
Not clear

Your question is not very clear. First have a look at below link to understand "XML".

http://www.w3schools.com/xml/

If your Component/API is returning XML output and you want to save it to some file, then have a look at below links.

http://msdn.microsoft.com/en-us/library/dw229a22.aspx
 
Share this answer
 
First advice is: don't save any components. Make one level of indirection. Create a pure data model, store and load/restore just the data model, and use the data model to populate and be updated by anything else.

The best way to persist any data in non-intrusive and universal way, with maximum flexibility and great provision for backward compatibility is using Data Contract, see: http://msdn.microsoft.com/en-us/library/ms733127.aspx[^].

See also my past solutions:
How can I utilize XML File streamwriter and reader in my form application?[^],
Creating property files...[^].

—SA
 
Share this answer
 
v2

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