I'm working on my Android application's initialization. I plan to have an XML file in the assets folder with a format like this:
<?xml version="1.0" encoding="utf-16"?>
<Videos>
<Video>
<id>1</id>
<title>Funny Cat</title>
<description>Description for the video</description>
<url>http://......</url>
</Video>
<Video>
.......
</Video>
</Videos>
With a subclass of DefaultHandler, I will parse the XML file when the app first launches, in order to initialize the database (if its empty).
Having provided this background information, I have two questions:
- Is this a good approach?
- How can I set my video titles and descriptions from strings stored in
res/values/strings.xml?
Any code would be much appreciated!
Thanks in advance.