Tip: Store lengthy XML snippets in a separate file
August 23rd, 2007 | Published in Google Desktop API
Posted by James Yum, Support Engineer (Google Desktop Team)
You've probably created elements dynamically at one point or another, using view.appendElement():
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');
view.appendElement(newXml);
Have a tip you'd like to share? Send it to gd-developer AT google DOT com.
You've probably created elements dynamically at one point or another, using view.appendElement():
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');
view.appendElement(newXml);
Have a tip you'd like to share? Send it to gd-developer AT google DOT com.