Actually, to simplify things, you could:
- Place your xml file into res/xml
- Use Resources.getXml to obtain the xml pull parser for your xml file
http://developer.android.com/reference/android/content/res/Resources.html#getXml(int)
- Handle parsing events as described here:
http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
-- Kostya
11.11.2010 19:35, zizzfusion пишет:
Thank you I've been looking through the NotePad example and I'm still
a little unsure about the actual referencing of the XML file. At the
moment I have it placed in the assets directory. If I'm to retrieve
data from the XML should I be referencing it by name directly or is
there a separate provider I need to use for it?
On Nov 11, 2:15 pm, Prakash Iyer<[email protected]> wrote:
Look at the NotePad example in the SDK. The main class is SQLiteDatabase.
There are functions to insert, update, replace and select. The helper is
good for creating and updating.
On Nov 11, 2010 8:28 AM, "zizzfusion"<[email protected]> wrote:
So I have a rather simple XML output from a database I made in mySQL.
Now what I want to do is retrieve this data and place it into the
SQLite database of my app. I'm at the stage where I've defined the
onCreate methods for each of the tables. The XML data may need to be
added to or changed over time so I need a way of dynamically loading
the data into the SQLite database. Should this be possible?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<android-developers%2Bunsubs
[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en