android - How to create XML from Java to save information? -


I have an application that has some information on the mobile. I have decided to use XML every time and it My project file

How can I create an XML and save it to a file in my project?

Please, check out this documentation: it clearly states how to write in a file.

Again, I recommend you use "JSON" instead of "XML" because it's easy to use to add your data to JSONObject and JSONObject in the file using myJsonObject.toString () .

. Back, read your file content and make it a new JSONObject in the same way:
JSONObject jsonDatas = new JSONObject (fileContent);


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

Registering an Interceptor For All Interface Implementaions in Castle Windsor -