|how can i save some string to xml file?
||[Jan. 9th, 2009|09:10 pm]
hi, everybody, does anybody can help me?|
i need to save 4 lines to xml file, i wrote the next code:
set thepath to "" & (path to desktop)
set theFile to thepath & "control.xml"
set TheText to "<?xml version='1.0' encoding='UTF-8'?>
<remote>" & return
open for access file theFile with write permission
set eof file theFile to 0
write TheText to file theFile starting at eof as Unicode text
close access file theFile
but it doesn't correct work for me, i receiving file like SimpleText Document and i don't working with it like xml document (after all i wanna load it in my flash app)