11-03-2009 03:27 PM
I get the content of a entire xml file into a string ..i need to write this string to a xml file ...how can i do that...and where will the file be store in the simulator...?
Kaddy
11-03-2009 07:19 PM
I need to do this for the version 4.2.1...please let me know...
Kaddy
11-03-2009 07:50 PM
There is a sample writing a file here, that might get you going:
How To - Capture and save a screen shot
Article Number: DB-00752
http://www.blackberry.com/knowledgecenterpublic/li
You will find the FileExplorerDemo also very useful.
I presume you want to write to the SD Card?
11-05-2009 01:17 PM
this we can use only with 4.3 and later i am using 4.2.1 ..and i want to be able to take the printout of the file many times to check..so file explorer is not a option....
Kaddy
11-05-2009 03:42 PM
The KB article I gave you is 4.3 only because it does a Screenshot. That was not why I pointed you at it.
Do you see the code it uses to write a sequence of bytes out? That code will work in 4.2.1. So all you have to do is copy that code, and turn your String into bytes (which you can do with getBytes()) rather than doing the Screenshot
FileExplorerDemo is very useful, because it will show you how to traverse directories, you might want to do that in order to check what files you already have, so you don't overwrite something.
I suspect that with these and the API documentation, you have enough to do the coding you require.