Polycom PDS 2000 Car Stereo System User Manual


 
Parsing Rule Reference Guide Appendix B: Data Parser
Polycom, Inc. 195
Mid
The Mid rule extracts a string of a specified length from a specified starting
character in the Source container.
Parameters:
Length: The number of characters to extract.
Start: The character position in the Source container from which to extract
the characters.
Example:
If the LongString container contains "abcdefghijklmnopqrstuvwxyz" then the
following rule will place "efghijklmn" in the ShortStuff container.
<ParsingRule Type="Mid" Source="LongString"
Result="ShortStuff">
<Length>10</Length>
<Start>5</Start>
</ParsingRule>
ParseDelimited
The ParseDelimited rule extracts a specific substring from a delimited string.
A delimited string is a string made up of substring separated by a delimiting
character. For example: "this,is,a,comma,delimited,string".
This rule is useful in parsing comma-separated-value files.
Parameters:
Delimiter: The delimiting character used to separate substrings.
Index (optional): Which substring to extract.
Example:
If the BigString container contains "this=is=a=short=string" then the following
rule places "short" in the Token container.
<ParsingRule Type="ParseDelimited" Source="BigString"
Result="Token">
<Delimiter>=</Delimiter>
<Index>4</Index>
</ParsingRule>