Polycom PDS 2000 Car Stereo System User Manual


 
Data Source Tutorial Appendix B: Data Parser
Polycom, Inc. 177
<ParsingRule Type="TrimFromStart" Source="Equation"
Result="Variable">
<SearchText>=</SearchText>
</ParsingRule>
<ParsingRule Type="TrimToEnd" Source="Equation" Result="Value">
<SearchText>=</SearchText>
</ParsingRule>
</DataItem>
A <DataItem> element should contain one or more index-aware parsing rules.
All of a DataItem's parsing rules are applied on each iteration. However, if a
given DataItem parsing rule itself contains child rules, those child rules are not
passed any index information for the current iteration. That is, child rules are
never treated as index-aware. For an example of this, see the Data Source
Tutorial below.
Data Source Tutorial
This section walks through the construction of a Data Source definition that
extracts weather data from the U.S. National Weather Service web site.
This tutorial assumes the reader is familiar with HTML syntax.
NOTE:This tutorial was written using the U.S. Weather Service web site. The
U.S. Weather Service may have changed their web site since writing, and so
there is no guarantee that this tutorial will still work now. The tutorial is
presented purely to illustrate Data Parser concepts.
In this tutorial we'll parse the weather data for New York City as obtained
from the URL http://www.srh.noaa.gov/zipcity.php?inputstring=10005.