Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
krh5150
Visitor

Update Existing XML File on Separate Drive

Hi,

Based on the documentation and what I could find elsewhere, I cannot figure out how to open an existing XML file for updating a single field and save. Basically, what I'm trying to do is instead of saving the current position of a video onto the Roku registry, I would like to store this value on the video's data XML file. There is a field in the XML file for this position already. The starting value is 0, but when a video is stopped, I would like to reopen this XML file (stored on a separate drive) for updating (writing) this field.

Can this be done on the Roku and if so, is there sample code of updating an existing XML file?

Thanks,
Kevin
0 Kudos
1 REPLY 1
RokuMarkn
Visitor

Re: Update Existing XML File on Separate Drive

If you're talking about updating a file on a USB drive, that's not supported. You cannot write to a USB drive.
If you're talking about updating a file on your server, that would need to be implemented by a CGI script on your server, which would then be invoked by a GET or POST from the Roku player.

You could write it to a tmp file, but the file would not persist after the app exits. There's an overview of all the persistent storage methods at http://sdkdocs.roku.com/display/sdkdoc/File+System

--Mark
0 Kudos