krh5150
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2013
05:40 AM
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
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
1 REPLY 1

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2013
08:12 AM
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
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