Tip: Store lengthy XML snippets in a separate file

Thursday, August 23, 2007 at 3:12 PM

You've probably created elements dynamically at one point or another, using view.appendElement():


Now, that's fine for small XML strings. For more complicated XML, it's often easier to keep the string in a text file and use gadget.storage.openText() to get the string:

var newXml = gadget.storage.openText('my.xml');

Have a tip you'd like to share? Send it to gd-developer AT google DOT com.

No comments: