PhixFlow Help

Binary File Grammar

This topic contains the pages:

Overview

To use a file collector to load data from a binary file, you must specify the file's structure or grammar. A binary file collector requires a grammar to define the file so that the collector can extract the data. Binary file grammars are defined in XML. With a binary file grammar you can define the structure of any binary or ASCII file that has a definable structure. The target nodes are the ones that will generate an output record.

To configure a File Collector to load data from a binary file you must:

  • specify the grammar in the File Format Description section
  • specify a set of target nodes in the Stream Item Node field.

The topic Binary File Grammar gives details of:

Grammar

A binary file grammar is an XML document that specifies the structure of a binary or ASCII file. 

Note in the following sections that:

  • attribute (beginning with lower case a) refers to attributes of nodes, in the standard terminology of XML.
  • Attribute Node (beginning with upper case A) refers to a node that represents a target File Collector Column– that is, an Attribute in PhixFlow that can be used in the output Stream to populate a Stream Attribute.
  • Control, Data, etc.Nodes – that is, types of nodes specific to PhixFlow binary file grammars – will start with an upper case letter.
  • Expressions are PhixFlow scripting expressions – see PhixFlow help for more details. All Expressions must be inside curly braces in a grammar file, unless contained in a Script Node.

Nodes

There are three classes of node in a binary file grammar:

  1. Control nodes that define the possible options, sequences, choices and repeating loops in the file. These nodes are:
    1. <Grammar/>
    2. <Repeat/>
    3. <Sequence/>
    4. <Choice/>
  2. Logic nodes that run Expressions to calculate values that might be used later, or to carry out validation logic. These nodes are:
    1. <Script/>
    2. <Validate/>
  3. Data nodes that construct the Attributes and Records that will be generated by the binary file reader. These nodes are:
    1. <Record/>
    2. <Attribute/>
    3. <Tag/>
    4. <Length/>
    5. <Name/>
    6. <Value/>
    7. <Bytes/>

Please let us know if we could improve this page feedback@phixflow.com