XML Documents for Click-To-Record

An XML document that implements click-to-record begins with the following XML:

<?xml version="1.0" encoding="utf-8" ?>
<clickToRecord xmlns="urn:schemas-microsoft-com:ehome:clicktorecord">
<description>Describe the recording scenario here</description>

The clickToRecord element is the top-level schema element in the clicktorecord namespace. Every click-to-record XML document must include this as the top-level element.

The body element can contain a single, optional metadata element that encapsulates the description and expires elements. These describe the recording request and specify the date and time when the click-to-record XML document expires. Windows Media Center ignores recording requests that have expired.

The body element must contain a single programRecord element, meaning that only one recording request at a time can be submitted to Windows Media Center. The programRecord element includes several attributes and child elements. Together, these attributes and child elements define the criteria that Windows Media Center uses to find, schedule, and record TV programs. The following example shows the hierarchy of a programRecord element and its child tags.


The child elements of programRecord include program, service, and airing, each of which can occur more than once. At a minimum, a click-to-record request must include at least one program element or one pair of service and airing elements.

The program element identifies a program to record. It specifies the title of a program, the title of the program episode, and, optionally, the year in which the program was released. The service element identifies the broadcasting service that provides the TV program to record. It can specify the name, call sign, affiliate call sign, or channel number of the service. The airing element specifies the starting date and time for a TV program.

When a click-to-record request is submitted, Windows Media Center searches through the Electronic Program Guide (EPG) for TV programs that match the information specified in the program, service, and airing elements. When Windows Media Center finds a match, it schedules a TV recording session.

If a click-to-record request includes multiple program elements, Windows Media Center begins its search with the first one. If no matching program is found, Windows Media Center uses the next program element. The search continues in this manner until Windows Media Center finds a matching TV program, at which point the search ends and any remaining program elements are left unused. Windows Media Center uses this same search pattern with the service and airing elements.

To specify search criteria, each program, service, and airing element contains one or more key elements. These specify the fields in the EPG that Windows Media Center should examine when it searches for the requested TV programs. The key elements also specify the rules that Windows Media Center should use in determining whether a particular program matches the search criteria. Multiple key elements are interpreted as logical ANDs; all of them must be satisfied to qualify as a match.

See Also