Naming is hard Posted September 26, 2006 Report Share Posted September 26, 2006 Hey everyone, I'v been searching for a project and i finally came up with one that is challenging but within my ability, So this project requires storing info and SAVING it to be loaded and read later.What it needs to store is Questions, 4 choices for answers, and then point value for each answer, Like those online "What superhero are you!", Would XML be a right choice for this? or could i do this with a .dat or .txt file. Quote Link to post Share on other sites
shanenin Posted September 26, 2006 Report Share Posted September 26, 2006 what language are you going to implemnt this in? Quote Link to post Share on other sites
Phil Posted September 26, 2006 Report Share Posted September 26, 2006 Would XML be a right choice for this? or could i do this with a .dat or .txt file.XML is a markup language and .txt/.dat are file extensions. They are only related in such that they are both concerned with computers.The best and easiest way to store this data would be in a database. However, if you want to use a flat file method, then XML isn't a bad start. This is because it can easily be put through regex matches to get out the data you need. The actual storage of the data in a flat file is irrelevant. You can name the file myfile.qwerty if you really wanted to. The computer will care not what the extension is. It'll read the contents of it no matter what extension it has.~Phil~ Quote Link to post Share on other sites
Naming is hard Posted September 26, 2006 Author Report Share Posted September 26, 2006 Hmm, Alright ill be using Python, can anyone recommend a good starting place to start learning how to manipulate XML with Python? Quote Link to post Share on other sites
shanenin Posted September 27, 2006 Report Share Posted September 27, 2006 I once wrote a script that read rss feads(XML), I am not even sure waht module I used, its been a while. I will see if i can did it up. Quote Link to post Share on other sites
shanenin Posted September 27, 2006 Report Share Posted September 27, 2006 I found this, but I am probably sure you did alsohttp://pyxml.sourceforge.net/topics/ Quote Link to post Share on other sites
Naming is hard Posted September 27, 2006 Author Report Share Posted September 27, 2006 I found this, but I am probably sure you did alsohttp://pyxml.sourceforge.net/topics/You know what, iv had that bookmarked for months but i forgot about it (thats the trouble when you have 200+bookmarks)Thanks for the reminder =) Quote Link to post Share on other sites
jcl Posted September 27, 2006 Report Share Posted September 27, 2006 You might also look at lxml. It's worked well for me in the past. (Site might be down ATM.) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.