Polycom Digital Signage Administrator Guide

Data Source Tutorial

 

 

is 20%.<br><br><b>Friday Night: </b>A slight chance of showers and thunderstorms before 10pm. Partly cloudy, with a low around 67. Northwest wind between 6 and 13 mph. Chance of precipitation is 20%.<br><br><b>Saturday: </b>Mostly sunny, with a high near 86. West wind between 8 and 16 mph. <br><br><b>Saturday Night: </b>Mostly clear, with a low around 69. <br><br><b>Sunday: </b>Mostly sunny, with a high near 92. <br><br><b>Sunday Night: </b>Partly cloudy, with a low around 75. <br><br><b>Monday: </b>Partly cloudy, with a high near 91. <br><br><b>Monday Night: </b>A chance of showers and thunderstorms. Partly cloudy, with a low around

73.Chance of precipitation is 30%.<br><br><b>Tuesday: </b>A chance of showers and thunderstorms. Partly cloudy, with a high near 88. Chance of precipitation is 30%.<br><br><b>Tuesday Night: </b>A chance of showers and thunderstorms. Partly cloudy, with a low around 72. Chance of precipitation is 30%.<br><br><b>Wednesday: </b>Partly cloudy, with a high near 89. <br><br></td>

(We've omitted the rest of the HTML code, as it's not pertinent to this tutorial.)

Our first task is to isolate the part of the data that contains the information we want. First we remove everything before the "Forecast at a Glance" string using a TrimToEnd rule:

<ParsingRule type="TrimToEnd" source="Source" result="Source">

<SearchText>Forecast at a Glance</SearchText> </ParsingRule>

Note that this rule overwrites the Source container, which initially contains the entire HTML text.

Next we extract the contents of the first <table> element after the "Forecast at a Glance" text using a GetTag rule:

<ParsingRule type="GetTag" source="Source" result="Source"> <StartTag><table</StartTag> <EndTag></table></EndTag>

</ParsingRule>

Note how the < and > characters in the StartTag and EndTag parameters are replaced with XML character entity codes < and >.

The above two rules replace the full HTML code in the Source container with the following:

width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr valign ="top" align="center">

<td width="11%"><b>Today<br></b><br><img src="/images/wtf/tsra70.jpg" width="55" height="58" alt="Heavy Rain Chance for Measurable Precipitation 70%" title="Heavy Rain Chance for Measurable Precipitation 70%" ><br>Heavy<br>Rain<br>Hi <font color="#FF0000">81°F</font></td><td

182

Polycom, Inc.

Page 192
Image 192
Polycom PDS 2000 manual 182