I am creating a small app for myself that I will use to take notes. I want it to take small rtf files that I create in a RichTextBox control and organize them by notebook and subcategory. Each file should be one notebook - for instance, a philosophy notebook. Each notebook will have subcategories, and each subcategory will have note entries that are organized by date. I want each notebook/file to actually work like an online weblog where each entry can be posted in more than one category.
But my question has more to do with saving and retrieving the files. I am not familiar enough with programming to know much about file I/O, so what is a good way to do this? How can I save a list of blocks of rtf, and keep the correct heirarchical structure?
Any advice is welcome, and thanks in advance!
Loading
RonaldPosted Jun 3, 2008, 2:07 PM
Mahesh ChandPosted Jun 3, 2008, 2:03 PM
Actually using XML is very easy. Here is a simple EBook available free.
http://www.c-sharpcorner.com/UploadFile/mahesh/XmlProgramming09142007082751AM/XmlProgramming.aspx
RonaldPosted Jun 3, 2008, 1:01 PM
Mahesh ChandPosted Jun 3, 2008, 11:31 AM
If you want to do this in RTF files, you may tag the lines for directory and subdirectories. For example, you can have something like this:
Root: Meetings
Parent: Personal
Child: Today is my meeting with doctor.
Root: Meetings
Parent: Personal
Child: Today my meeting is with my wife.
==============================
Personally I think RTF is not a good idea to store structured data. Your IO cost will be too much and parsing will take more time than using database or XML documents.