Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zshall/program-guide/llms.txt
Use this file to discover all available pages before exploring further.
guide.xml is the data layer for Television Simulator ‘99. It is a static XML file that carries every channel name, programme listing, on-screen notice, and ad panel shown by the Prevue guide. The file is fetched once at startup — after the YouTube IFrame API is ready — parsed into a jQuery object, and stored globally so every channel class can query it without making additional HTTP requests.
Loading Sequence
After theyoutubeReady event fires, TV.startUp() issues a jQuery AJAX GET request, parses the raw response with $.parseXML, and wraps the result in jQuery for easy traversal:
window.guideData is available to any code in the page. Channel classes receive guideData as a constructor argument (stored as this.guideData), but in practice Channel12.show() reads the global guideData variable directly rather than using this.guideData.
The channel launched at startup is the
<channel> element that carries both the watchable and default attributes. In the default guide.xml that is channel 12 (PRV). Removing either attribute from that element will prevent the simulator from loading a default channel.Document Structure
The root<guide> element contains three kinds of children:
<videos>
Reserved for future use. Currently holds one <video> element with an id attribute referencing a YouTube video ID, but no channel class reads from this section at runtime. Channel12 hardcodes its video ID (9NSVU4Gv_wA) directly in script.js rather than sourcing it from the XML.
<ads>
A list of <ad> elements displayed in the left-hand panel of Channel 12. Each ad contains arbitrary HTML and a duration attribute (in seconds):
<ad> element into this.adList and rotates through them using nextAd(). The duration value defaults to this.defaultAdDuration (30 seconds) if the attribute is absent.
<channel>
The bulk of the file consists of <channel> elements, each representing one row in the program grid.
Channel Attributes
| Attribute | Required | Description |
|---|---|---|
number | Yes | Channel number shown in the grid and used as the TV.showChannel argument. |
name | Yes | Short station callsign shown below the channel number (e.g. KCBS, PRV). |
watchable | No | Presence (no value needed) marks the channel as one the viewer can tune to. |
default | No | Presence marks this channel as the one loaded automatically at startup. |
noticeonly | No | Presence causes Channel 12 to skip rendering a channel row; only its <notice> elements are shown. |
The Timeslot System
Each half-hour of the day maps to a timeslot index:| Timeslot | Time of Day |
|---|---|
| 0 | 12:00 AM (midnight) |
| 1 | 12:30 AM |
| 2 | 1:00 AM |
| … | … |
| 18 | 9:00 AM |
| 19 | 9:30 AM |
| 20 | 10:00 AM |
| 33 | 4:30 PM |
| 38 | 7:00 PM |
| 48 | 12:00 AM (next day) |
<listing> with timeslot="19" starts at 9:30 AM. If the next listing for that channel is at timeslot="21" (10:30 AM), the programme spans two half-hour cells and will be rendered with colspan="2" in the grid.
getFirstListing() Logic
Channel 12 finds the correct listing for a given display column by walking backwards from the target timeslot until it finds a match:
<listing> Attributes
| Attribute | Description |
|---|---|
timeslot | Half-hour index at which the programme starts. |
type | 1 = regular programme; 9 = alternate style; movie = movie (rendered with a CSS class). |
data2 | Duration category code used in the original Prevue data format; not directly rendered. |
rating | Optional content rating string (e.g. TV-PG, G, PG-13) displayed in the listing cell. |
continuous | Presence indicates the programme continues from the previous day. |
noticeonly | Presence on a <channel> (not a listing) causes the row to be skipped entirely except for its notices. |
.html():
<notice> Elements
<notice> children of a <channel> are rendered as full-width rows with a red background, spanning all four columns of the grid:
Representative Sample
Below is an abbreviated but complete slice ofguide.xml showing each element type in context: