HotDocs Update RSS Document

From HotDocs Wiki

Jump to: navigation, search

A HotDocs update RSS document is an XML file that conforms (with a few exceptions) to the RSS 2.0 specifications. Using a HotDocs update RSS document (feed) hosted on your organization's Web server, along with a catalog file installed on each user's desktop, you can implement an automatic system for alerting users about important changes to your published template set. The RSS document contains a list of available updates for your template set, which HotDocs reads at regular intervals to inform users when new updates are available. You can create a HotDocs update RSS document manually, using a text editor such as Notepad, or automatically, using COM automation. The method you choose will likely be based on the number of updates you expect to distribute and your ability to develop a custom application to create and update the RSS document automatically. Either way, the format of the file is the same. It contains one channel with the following required elements:


Manually Creating an RSS Document

Manually creating a HotDocs update RSS document is fairly simple. Just open a text editor such as Notepad, type the contents of the file, and save it with a .RSS file name extension. The following example shows the contents of a typical RSS document with three update items:

<?xml version="1.0"?>

<rss version="2.0">

<channel>

<title>Hobble Creek Real Estate Forms</title>

<link>http://www.HobbleCreek.com/update.rss</link>

<description>Serving you since 1994</description>

<item required="true">

<title>Real Estate Purchase Contract (REPC)</title>

<link>http://www.HobbleCreek.com/repc.hdi</link>

<description>This is the new form adopted by the State Real Estate Commission</description>

<guid>00001</guid>

<category>File Update</category>

<pubDate>Tue, 21 Mar 2006 15:27:18 GMT</pubDate>

</item>

<item>

<title>Visit the new Hobble Creek Real Estate Web Site</title>

<link>http://www.HobbleCreek.com</link>

<description>New features are added daily</description>

<guid>00002</guid>

<category>Message</category>

<pubDate>Tue, 21 Mar 2006 15:27:18 GMT</pubDate>

</item>

<item>

<title>Happy Holidays</title>

<link></link>

<description>Wishing you a happy holiday season from your friends at Hobble CreekReal Estate.</description>

<guid>00003</guid>

<category>Message</category>

<pubDate>Tue, 21 Mar 2006 15:27:18 GMT</pubDate>

</item>

</channel>

</rss>

This RSS document contains enough information to let HotDocs know that there are three updates to the template set, and where it can go to download those updates. (In this example, only one of the updates is a template update; the other two are "message" updates that take the user to a Web page or display a short text message.) Whenever you need to create a new update item, you can just edit the RSS document, add a new item to the end of the list, and save the updated RSS document on the server.

Automatically Creating an RSS Document

If you need to create many RSS documents, or add many update items to existing RSS documents, you may choose to write your own application that creates the files automatically. This application might prompt you for a file name and basic information about the template set (e.g., title, password, URL), and then create the file for you. Then, whenever you need to update the RSS document, the tool can open an existing document, prompt you for information about the new update, and save the changes to disk. Using an automated method like this can save you time whenever you need to create a new RSS document, and it can also reduce the chance of using incorrect syntax in the file.

To help you write a custom application for creating HotDocs update RSS documents, HotDocs 2006 includes a COM type library with objects and methods you can use to easily create valid update RSS documents. Here are some examples that use these objects to create a basic RSS document like the one shown above:

Visual Basic example

Dim rss As New HDNETLib.UpdateDocumentClass

Dim rssChannel As New HDNETLib.UpdateChannelClass

Dim updateItem As HDNETLib.UpdateItemClass


rssChannel.title = "Hobble Creek Real Estate Forms"

rssChannel.description = "Serving you since 1994"

rssChannel.link = "http://www.HobbleCreek.com/update.rss"


'First Update Item

updateItem = New HDNETLib.UpdateItemClass

updateItem.required = True

updateItem.title = "Real Estate Purchase Contract (REPC)"

updateItem.link = "http://www.HobbleCreek.com/repc.hdi"

updateItem.description = "This is the new form adopted by the State Real Estate Commission."

updateItem.guid = "00001"

updateItem.category = "File Update"

updateItem.pubDate = System.DateTime.Now

rssChannel.items.Add(updateItem)


'Second Update Item

updateItem = New HDNETLib.UpdateItemClass

updateItem.required = True

updateItem.title = "Visit the new Hobble Creek Real Estate Web Site"

updateItem.link = "http://www.HobbleCreek.com"

updateItem.description = "New features are added daily"

updateItem.guid = "00002"

updateItem.category = "Message"

updateItem.pubDate = System.DateTime.Now

rssChannel.items.Add(updateItem)


'Third Update Item

updateItem = New HDNETLib.UpdateItemClass

updateItem.required = True

updateItem.title = "Happy Holidays"

updateItem.description = "Wishing you a happy holiday season from your friends at Hobble Creek Real Estate"

updateItem.guid = "00003"

updateItem.category = "Message"

updateItem.pubDate = System.DateTime.Now

rssChannel.items.Add(updateItem)


'Add channels collection to the update document and save.

rss,channels.Add(rssChannel)

rss.Save("c:\\example.rss")

Visual C# Example

HDNETLib.UpdateDocumentClass rss = new HDNETLib.UpdateDocumentClass();

HDNETLib.UpdateChannel rssChannel = new HDNETLib.UpdateChannelClass();

HDNETLib.UpdateItemClass updateItem;


rssChannel.title = "Hobble Creek Real Estate Forms";

rssChannel.description = "Serving you since 1994";

rssChannel.link = "http://www.HobbleCreek.com/update.rss";


//First Update Item

updateItem = new HDNETLib.UpdateItemClass();

updateItem.required = true;

updateItem.title = "Real Estate Purchase Contract (REPC)";

updateItem.link = "http://www.HobbleCreek.com/repc.hdi";

updateItem.description = "This is the new form adopted by the State Real Estate Commission.";

updateItem.guid = "00001";

updateItem.category = "File Update";

updateItem.pubDate = System.DateTime.Now;

rssChannel.items.Add(updateItem);


//Second Update Item

updateItem = new HDNETLib.UpdateItemClass();

updateItem.required = true;

updateItem.title = "Visit the new Hobble Creek Real Estate Web Site";

updateItem.link = "http://www.HobbleCreek.com";

updateItem.description = "New features are added daily";

updateItem.guid = "00002";

updateItem.category = "Message";

updateItem.pubDate = System.DateTime.Now;

rssChannel.items.Add(updateItem);


//Third Update Item

updateItem = new HDNETLib.UpdateItemClass();

updateItem.required = true;

updateItem.title = "Happy Holidays";

updateItem.description = "Wishing you a happy holiday season from your friends at Hobble Creek Real Estate";

updateItem.guid = "00003";

updateItem.category = "Message";

updateItem.pubDate = System.DateTime.Now;

rssChannel.items.Add(updateItem);


//Add channels collection to the update document and save.

rss.channels.Add(rssChannel);

rss.Save("c:\\example.rss");