jeudi 16 avril 2015

How Save HTML Content in SQLite

How can we save a JSON adapted WordPress post completely with links, images , in a way that is accessible offline ?


There is no problem in saving plain texts and Thumbnail images, but how can we save images that are among texts?



Here is an idea: we could make an algorithm to reverse values between so we can download the image, then address the device memory so that when it is read from the database, texts and images will be showed properly



What's the best way to save an HTML file content completely and thoroughly?


for example i have this String:



<p> Text 1 </p> <img src="www.test.com/1.jpg" >
<p> Text 2 </p> <img src="http://ift.tt/1zleIRN" >


i want save it into SQLite like this :



<p> Text 1 </p> <img src= myDir + "/1.jpg" >
<p> Text 2 </p> <img src= myDir + "/2.jpg" >

Aucun commentaire:

Enregistrer un commentaire