Polycom PDS 2000 manual 176

Models: PDS 2000

1 216
Download 216 pages 52.8 Kb
Page 186
Image 186

Polycom Digital Signage Administrator Guide

Data Source Definition File Overview

 

 

URL can be used to specify a new source that is only used for the parsing rules contained in the <DataItem> element. The URL is resolved and its contents are placed into the "Source" container before any of the DataItem's parsing rules are applied.

NumRecords specifies how many times to apply the DataItem's parsing rules. Any <ParsingRule> elements contained in a <DataItem> are applied in their order of appearance up to NumRecords times, or until an index-aware parsing rule returns an empty value.

Each time a DataItem's parsing rules are applied, the rules' Results are written into a new set of empty containers. A new row is added to the data table being created, and any parsing rule Results that identify a data table field are written to the new row.

Setting NumRecords to 0 (which is the default value) is the same as setting it to 999.

Here is a simple example of a <DataItem> element that contains a single parsing rule. The following defines a table with a City column and adds 5 rows to that table, each containing the value "New York, NY".

<DataSource>

<General>

<RefreshInterval>…</RefreshInterval>

<AllowDuplicates>…</AllowDuplicates>

<Url>…</Url>

<Database>…</Database> <TableStructure Name="SampleTable"> <Field Type="Text">City</Field> </TableStructure>

</General>

<DataItem NumRecords="5">

<ParsingRule Type="SetValue" Result="City"> <Value>New York, NY</Value> </ParsingRule>

</DataItem>

</DataSource>

Here how to use a <DataItem> element to parse the string "(x=1)(y=2)(z=3)". Assume we want to extract each equation's variable (x or y or z) and value (1 or 2 or 3).

<DataItem>

<ParsingRule Type="GetTag" Source="Source" Result="Equation"> <StartTag>(</StartTag>

<EndTag>)</EndTag>

</ParsingRule>

176

Polycom, Inc.

Page 186
Image 186
Polycom PDS 2000 manual 176