How to Create Channels in XML

Channels helps a user to include shortcuts to web sites. These channels notify the user whenever any critical information has been changed in the web sites. This process is known as Web casting or Push. Channel Definition Format developed by Microsoft for defining channels is one of the first real time applications of XML.

It is defined in a separate file whose extension is CDF. A CDF file is a pure XML file, which contains links to HTML documents. The CDF file need not be an addition to a web site. The site may contain a link to the CDF file.

When the user traverses through the link a copy of the channel index is downloaded to the user’s machine. Also an icon is placed in the channel bar which links to the contents of the channel at the same time.

Creation of channels:

The steps to be followed in creating a channel Creation format are the following:

· The contents of the channel should be determined.

· The CDF file is written which contains the links to these contents.

· A link should be placed in the web sites home page.

Some of the points that are to be considered while deciding the contents of a channel are the following:

1. A channel should not have more than eight items.
2. Channels should be arranged hierarchically.
3. A channel can contain sub-channels.
4. The hierarchy of the channels should match the hierarchy of the web site for easy maintenance.

The next consideration is the ways in which the updated information about a channel is delivered to the end user. There are three different ways in which the user can obtain the updated information. In the first way the user can check in whenever, with the help of the channel bar.

The second way is to notify the users through e-mail and then load the channel whenever they want to. The third way is that the browser can periodically check the web site for updates and download the contents automatically.

Creating channels using cdf document:

A CDF document is an XML document and hence follows the rules of XML only. A CDF document begins with an XML declaration. The channel element is the root of all CDF documents. The channel element should contain the HREF attribute, which contains the link to the page being monitored for changes. Example for a simple CDF document:

<?xml version=”1.0”?>
<CHANNEL HREF=”somelink.htm “>

A channel can contain a collection of other pages that are identified by the ITEM. Each ITEM element has a corresponding HREF attribute which identifies a page. Channels are often shown as collapsible tree structure. To add a channel to the web browsers channel the following steps should be followed:

1. Save the (above example) lines of code in a file called add.cdf.

2. Open this file in windows explorer.

Once the file is opened, a screen will be prompted. Click OK to add this channel to the channels folder. After adding the new channel, it is then listed in the browsers channel folder. Once after creation of the CDF file it must be made available to the end user. An easy way to do is to link the CDF file with a standard HTML <A> tag. An example for how it is done is given below:

<A HREF =”add.cdf”>Add Home page to Channels</A>
When the user activates this link in a CDF enabled browser such as Internet Explorer 5.0, the browser downloads this file and adds the channel to its list of subscriptions.

Thus a channel and each ITEM in the channel can have a title, an abstract, and up to three logos of different sizes. These are established by giving the Channel and ITEM elements TITLE, ABSTRACT, and LOGO.


SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.


Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.


FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.



Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.



Add to My Yahoo!

Visit XML Training Material Guide Homepage



“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.