Can I save informations to a XML that can be readed after?
I know how to do to read from XML but I dont know if I can save information to an XML file
if someone can help me, thanks [import]uid: 23063 topic_id: 16177 reply_id: 316177[/import]
Can I save informations to a XML that can be readed after?
I know how to do to read from XML but I dont know if I can save information to an XML file
if someone can help me, thanks [import]uid: 23063 topic_id: 16177 reply_id: 316177[/import]
you can write to the XML file all of the information that you need to read later. Yes, the information can be read.
cheers,
?
[import]uid: 3826 topic_id: 16177 reply_id: 60194[/import]
sooooo… how can I do that in corona ? :S
i’m not saying to write manually, i’m saying to save information to a xml
it’s like… I need that my code read an xml file and after write this xml, saving his informations to “informations.xml”
and keep doing this, saving in “informations.xml”
get it? :S [import]uid: 23063 topic_id: 16177 reply_id: 60200[/import]
I know this doesn’t answer your question directly, as you may have no choice but to use XML depending on your project’s requirements, but in case you can explore alternatives, have you tried looking into JSON?
It has very similar (in many projects, identical) use cases, is very lightweight, and is much easier to use in Corona (due to the included JSON library).
The best part is, you can encode/decode JSON as well, making it easy to save JSON files for later loading.
Here’s a tutorial:
http://blog.anscamobile.com/2011/08/tutorial-exploring-json-usage-in-corona/ [import]uid: 52430 topic_id: 16177 reply_id: 60267[/import]
If you are just to read and write the info locally, you may use SQLite database instead of dealing with xml files and parsing issue. [import]uid: 42593 topic_id: 16177 reply_id: 60278[/import]
My initial idea was to see the xml of my database and then display on the screen, but I do not know how to do this I thought it best to download the xml of the Internet and read it [import]uid: 23063 topic_id: 16177 reply_id: 60283[/import]
Here is the link regarding using XML:
http://blog.anscamobile.com/2011/07/how-to-use-xml-files-in-corona/ [import]uid: 42593 topic_id: 16177 reply_id: 60304[/import]
I have read this tutorial before but in this tutorial don’t says if is possible save informations from corona to an xml :S [import]uid: 23063 topic_id: 16177 reply_id: 60309[/import]
Unless you need to return the XML to other party, otherwise I would just retrieve XML from local or outside world thru internet, then parse the XML and store the info into SQLite for later use. It is much easier to manage the data from database SQLite. [import]uid: 42593 topic_id: 16177 reply_id: 60452[/import]