Polycom PDS 2000 manual ParsingRule Element

Models: PDS 2000

1 216
Download 216 pages 52.8 Kb
Page 183
Image 183

Data Source Definition File Overview

Appendix B: Data Parser

 

 

the table, and will create an index for this column. The default for KeyField is False.

Regardless of the table structure schema, Data Parser always inserts two additional columns into the table:

An ID column that contains a serial number for each row. Serial numbers start at 1 for the first row and are incremented by one for each additional row in the table.

A Last Update column that contains the date and time the row was added to the table. This is generally the same value for all rows, unless Data Parser is creating a table with a particularly large number of rows or if the parsing work required for each row is quite long.

An optional <PublishFile> element identifies an XML file which will contain a copy of the data table generated by this data source.

Here is a simple example of a <General> element. This example instructs Data Parser to parse the data feed at http://www.example.com/news.html every 300 seconds, and to store the results in a file named Example.mdb, in a table named SampleTable with three Text columns: Headline, Reporter, and Date.

<General>

<Url>http://www.example.com/news.html</Url>

<Database>Example.mdb</Database>

<AllowDuplicates>True</AllowDuplicates>

<RefreshInterval>300</RefreshInterval>

<TableStructure>

<Field Type="Text">Headline</Field> <Field Type="Text">Reporter</Field> <Field Type="Text">Date</Field>

</TableStructure> </General>

The ParsingRule Element

The <ParsingRule> element is the backbone of the data source definition. The purpose of this element is to extract text from a source, optionally manipulate the extracted text in some way, and place the result in a destination. It helps to think of sources and destinations as containers of text.

A <ParsingRule> element can contain other <ParsingRule> elements. Child <ParsingRule> elements are run after the parent rule.

The <ParsingRule> element has 3 required attributes:

Type specifies the type of parsing rule to be used. See the Data Source Definition Reference Guide for a complete list of parsing rule types.

Polycom, Inc.

173

Page 183
Image 183
Polycom PDS 2000 manual ParsingRule Element