What is the most appropriate way to store some structured texts?The texts will be a collection of “books”.each book contains a collection of articles,and each article has a title and a body.
The ways i could think of are:
-
create a database using sqlite
-
write an xml file in assets
-
put them into res/value/string
-
use java string
which method is the best for my situation?is there a better way other than those ive listed above?
Thanks in advance.
=========================
edit: Yes,the data can be regarded as static.
XML, or any other format you prefer in
res/assetsis the preferred way, if your data is static (it won’t change).If you want to work with dynamic data gathered from a webapp for example, then you should use the built in SQLite database.