Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

Update Existing XML File on Separate Drive


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?

0 Kudos
1 REPLY 1\
Level 8

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

0 Kudos