Persisting widget data across platforms and devices using Opera's XML store
16th December 2011: This article is obsolete
This technology is obsolete: it is no longer supported and therefore shouldn't be used.
Opera widgets often have the need to persist data - this is usually saved locally using
preferenceForkey preferences. This works well, but it has the limitation that the data is only available to that single browser installation. To let widgets have access to the same data across different platforms and devices the idea of a simple RESTful XML store came to mind, and this thought motivated us to releasing the Opera XML Store, which does just that - persists widget data across different platforms and devices using XML, in a RESTful manner. This article gives you an introduction to using it in your widgets.
Note that the Opera XML Store requires that you have a My.Opera username and password for authentication. If you are not already a member, please sign up here.
Try it out for yourself
To get started, first try out some of our widgets that make use of the storage service:
Your stored data is even available as plain HTML, and can be browsed in any browser. Go to the Opera XML Store home page and click browse. You will be able to browse your own data as well as other users' data if they have given you the permission to do so. Go to the XML Store help section to find more details on how to make use of the XML Store, including technical reference, documentation, and more.
The data you store is validated against the data models schema and will not allow you to store malformed or invalid XML. As the data store cares about its format and doesn't just store any old chunks of text, you can perform XPath operations against a data collection or a document, allowing you to extract just the data you need.
This article is licensed under a Creative Commons Attribution, Non Commercial - Share Alike 2.5 license.