I'm writing an application that manages todo lists. Unlike 'traditional' todo list applications I want users to have these todo list files sit on their filesystem and be visible instead of being magically hidden by the app. I want users to be able to email todo lists to each other and so on. In addition, I later intend to create a web app with a database backend that will allow users to collaborate on todo lists.
The question I have is, what file format should I use to store the local files of my application? When I started thinking about this, the first think that came to mind was XML because it's (somewhat) readable but then I thought about sqlite then found out about YAML and now I'm quite confused. Some guidance would be appreciated.
Update:
I should mention that I will most probably be coding this in C++, Objective C or (not very likely, though) python. So whatever format is proposed it needs to have appropriate libraries.
Update 2:
I'm also concerned about being able to associate all these different formats with my applications so when opens a file of my application format, my application opens up instead of something like a text editor.
I'm a big fan of using SQLite databases as document files (gives you structure, a good analysis tool, transactions, etc); but if you want the user to simply take the document and email it, a robust text-based format would be much better.
XML is a possibility; but it's far too verbose and ugly. YAML is a lot more readable, it can look like an .INI file, but with more structure. JSON is an intermediate, not as readable as YAML, not as ugly as XML.
All three formats can take any arbitrary structure, produce the text-based representation and reconstruct the structure from it, so they're functionally equivalent.
The main advantage of XML seem to be that it's easy to detect when it has been accidentally damaged, because it will no longer be a well-formed document. But it's not hard to add some checksums or similar fields to any format.