1

i want to store xml response in sqlite and retrieve when data coming from server from it my response is following..

<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-061e1</UserId></Table1></NewDataSet></diffgr:diffgram></Login_ValidateAuthenticatedUserResult></Login_ValidateAuthenticatedUserResponse></soap:Body></soap:Envelope>
Yogesh Tatwal
  • 2,722
  • 20
  • 43

1 Answers1

1

You can parse the xml first and then store the fields in your sqlite. Your database schema should be according the info that you want to be stored.
Android dev site give you the various parsing options.
I really dont know why would you want to store the file and parse it later. Even if you want to store, then why store in database? There are other storage options too. You should store the file on external storage and then use it later whenever you want to. This link gives you how to write a file to external storage.

Community
  • 1
  • 1
Antrromet
  • 15,294
  • 10
  • 60
  • 75