--- title: "Structure of the Cargo-IMP parser configuration file" slug: "cargo-imp-config-file" updated: 2025-11-13T10:33:27Z published: 2025-11-14T02:46:17Z canonical: "docs.lobstersoftware.com/cargo-imp-config-file" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Structure of the Cargo-IMP parser configuration file The Cargo-IMP parser needs an XML configuration file, in which all the message specific parsing rules are specified. ![images/download/thumbnails/201683945/CargoIMP_5-version-1-modificationdate-1749434088679-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/CargoIMP_5-version-1-modificationdate-1749434088679-api-v2.png) (1) Tag *rules* with attributes *delim* and *segmentMinLength*. All Cargo-IMP messages are defined within the *rules* tag. Simply use the delimiter and minimal segment length as it is given in this screenshot. (2) Every single Cargo-IMP message is defined within a *message* tag. (3) The *id* as it is given in the Cargo-IMP PDF message specification. You will also find this value in a Cargo-IMP data file in the first line, **before** the slant (*STR/2*). The *id* can be specified as a string and will then be interpreted as a *Begins with* match code. In addition to that, you can use regular expressions. To do so, use the prefix *regex:*. So *id="ACD"* or *id="regex:^ACD.*"* for example. The target for the ID check is the entire read in data line. (4) The *version* as it is given in the Cargo-IMP PDF message specification. You will also find this value in a Cargo-IMP data file in the first line, **after** the slant (*STR/2*). (5) The segment and its *id*, which is always the first field *Standard Message Identifier* in every Cargo-IMP format. (6) The tag *token* is used to define the splitting of data in a token. A token is the data that can be found in between slants. Attribute *pos* describes the position of the token, where *pos="1"* describes the data (or token) from the start of a line until the first slant and *pos="2"* describes the data (or token) in between slant 1 and slant 2. This XML configuration file can be found in *./etc/admin/datawizard/cargo-imp_rules.xml*.