1

I have a xml file which has data. I want to import this data into my application database.

<?xml version="1.0" encoding="utf-8" ?>
<!--  phpMyAdmin XML Dump version 3.2.4 http://www.phpmyadmin.net
       - Host: localhost
       - Generation Time: Feb 11, 2012 at 02:56 PM
       - Server version: 5.1.41   PHP Version: 5.3.1  -->
<!--   Database: 'lms'  -->
<lms>
  <!-- Table lms_mst_questionbank -->
  <lms_mst_questionbank>
    <qst_code>7</qst_code>
    <qst_prg_code>1</qst_prg_code>
    <qst_mod_code>2</qst_mod_code>
    <qst_Question>What is not true about left 
                  dominant cardiology circulation?</qst_Question>
    <qst_opt1>It is seen in 20% ...</qst_opt1>
    <qst_opt2>Left circumflex artery supplies ...</qst_opt2>
    <qst_opt3>Left circumflex artery terminates ...</qst_opt3>
    <qst_opt4>Left circumflex artery may originate ...</qst_opt4>
    <qst_opt01>1</qst_opt01>
    <qst_opt02>1</qst_opt02>
    <qst_opt03>1</qst_opt03>
    <qst_opt04>1</qst_opt04>
    <qst_CorctOpt>1</qst_CorctOpt>
    <qst_Marks>10</qst_Marks>
    <qst_company_code>1</qst_company_code>
    <user_code>1</user_code>
    </lms_mst_questionbank>
</lms>
  • How can i import the xml into sqlite?
surfmuggle
  • 5,527
  • 7
  • 48
  • 77
naleshmadur
  • 95
  • 1
  • 10
  • dump it into csv and load it using http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles or create your own xmlparser and load it. http://stackoverflow.com/questions/7291886/parsing-xml-xmlpullparser-android – Sergey Benner Feb 16 '12 at 13:53
  • thanks sergey i use your method it works now i want to open the database and retrive the data from database on button click – naleshmadur Feb 18 '12 at 05:24

0 Answers0