How can I save objects as XML files
I'm working on my high-school mat开发者_如何学Pythonriculation asp.net project, and I wish to make a website of a bookstore.
I want to create two classes,Book
and BookStore
, and save the data created in XML files and not in a database.
How can I save objects as XML files, and how can I load them afterwards?
Thank you very much.
You need to use XML serialisation. There are tons of examples of how to do this, but here's one link for you to get started:
http://devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=236
精彩评论