Monday, October 29, 2007

Make your own ‘Hello World’ iGoogle gadget


Making an iGoogle gadget is very simple task. iGoogle gadget is an XML file where code is written using few web technologies. You just need to be familiar with HTML, JavaScript at the beginning.

We’ll see how we can make ‘Hello World’ iGoogle gadget
A. Making XML file


<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html"><![CDATA[
Hello, world!
]]></Content>
</Module>


1. As we write a simple standard XML file, we’ve to start in a same way. Writing XML version tag is mandatory. like this
<?xml version="1.0" encoding="UTF-8"?>

2.
<Module>
This tag is a root tag for the XML file and it is used to identify this is gadget’s file

3.
<ModulePrefs>
This contains title, author, and description for the gadget

4.
<Content type="html">
This indicate that this is HTML gadget

5.
<![CDATA[
Hello, world!
]]>
In the place of ‘Hello world’ we can place any HTML, JavaScript content. Gadget’s XML parser will not parse CDATA as XML content.

Check this 'Google Gadget Editor' for editing XML and to preview it there itself. Add this gadget into iGoogle from here

Thats it!


Add this article to social Bookmarks

No comments: