1

In my application I have downloaded .xml file from server and i want to store complete .xml file in my sqlite database and retrieve from it as .xml file.

See the example of .xml file

<soap:Envelope><soap:Body><Login_ValidateAuthenticatedUserResponse><Login_ValidateAuthenticatedUserResult><xs:schema id="NewDataSet"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="Table1"><xs:complexType><xs:sequence><xs:element name="ReturnValue" type="xs:int" minOccurs="0"/><xs:element name="UserId" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram><NewDataSet><Table1 diffgr:id="Table11" msdata:rowOrder="0" diffgr:hasChanges="inserted"><ReturnValue>100</ReturnValue><UserId>bc43c80d-061e-4683-9d2a</UserId></Table1></NewDataSet></diffgr:diffgram></Login_ValidateAuthenticatedUserResult></Login_ValidateAuthenticatedUserResponse></soap:Body></soap:Envelope>
2
  • your question is not clear.Please elaborate Commented Feb 6, 2013 at 5:15
  • 1
    Try taking a look at a SAXparser to parse the xml, and then put it into a database using SQLiteOpenHelper. Commented Feb 6, 2013 at 5:16

1 Answer 1

2

You can't store a file directly in SQLite. Rather, parse the XML by using a SAX parser or DOM parser, create a database with corresponding tag names as the table columns and then store the values according to their tag names in their respective columns.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.