--- title: "Match codes, unique/reserved names for XML" slug: "document-type-xml-names" updated: 2026-09-28T12:20:15Z published: 2026-09-28T12:20:15Z canonical: "docs.lobstersoftware.com/document-type-xml-names" --- > ## 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. # Match codes, unique/reserved names for XML If you generate a structure automatically, you do not have to worry about the match codes, unique names and reserved names. These will then be generated automatically. The following explanations are only for your understanding and if you want to make manual extensions or changes. ## Match codes Concerns only the source structure, i.e. parsed XML files. In Document type "XML", nodes and fields have match codes equal to the name of the XML element. The attribute fields `TYPE_attr` and `TYPE-1_attr` and the nodes `TYPE` and `TYPE-1` have the same match code `Equals=TYPE`. The value fields `TYPE_val` and `TYPE-1_val` do not have match codes. Values will be assigned to the fields via the name match with the node. If match codes are defined for these fields, they will be ignored. For automatic generation of match codes for XML, see [Match codes](/v1/docs/en/intro-profiles-phase-2-parsing-match-codes). ## Unique node and field names In XML, elements with the same name can occur in different hierarchy levels of the XML document. To ensure the uniqueness of the names of all nodes and fields in a Profile, a numeric suffix is therefore appended to each name that already exists in the structure. The number is continuously incremented, but it can also be changed after the structure import if the uniqueness of the names is preserved. The order of the suffix numbers is irrelevant. > [!NOTE] > **NOTE:** > > - Theoretically, the same name of a field or node of the source structure can be used in the target structure (and vice versa). However, one should refrain from doing so to prevent confusion. > - Suffixes are recognized internally by the character - and `#` and `a` following digit. For the field name `somename-0sometext`, the suffix `-0sometext` would be recognized. This does not matter in the automated case, but can be useful in the case of a manual adjustment. | Suffix in source structure | - | | --- | --- | | Suffix in target structure | # | ## Reserved names The following suffixes in field names are reserved. - `_val`: A field with this suffix contains the value of the XML element. - `_attr`: Fields with this suffix can be used to add attributes to an XML element. As an example, `id_attr` would add the attribute `id` to the element. The following suffixes are only relevant for target structures when generating XML files with the `XMLNoTemplateUnit`. - `_nsdef`: (e.g. `xsd_nsdef`) This suffix defines an additional namespace in the XML element (XSD). The content of this field is the namespace itself, e.g. *http://www.w3.org/2001/XMLSchema*. - `_name`: Field to rename the XML element that is created out of the corresponding parent node. The name of the XML element is no longer determined by the name of the parent node but the value of the field (not name). The field name needs a prefix that is equal to the name of the parent node that shall be renamed. So if you want to rename parent node `POS`, you have to use field name `POS_name`. ## Example In an XML document, for example, an element `TYPE` may occur at multiple locations in the hierarchy and, additionally, an attribute `TYPE` may be assigned to other elements. Following an example file. ```xml WE        WI     BY SE ``` The following screenshot shows the corresponding source and target structure for the XML snippet in the listing above. ![images/download/attachments/201684012/595-version-1-modificationdate-1749437675479-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/595-version-1-modificationdate-1749437675479-api-v2.png) Element `ORDER` has an attribute `TYPE`. It is represented by node `ORDER` and filed `TYPE_attr`. Element `TYPE` in `ADDR` has an attribute `quali` and a value. It is represented by node `TYPE`, the attribute field `quali_attr` and the value field `TYPE_val`. The value field **has to** use the name of the node and suffix *_val* as its name. Within the element `TYPEDEFINITIONS`, there can be several elements `TYPE` with attribute *source* and a value. This is represented by the node `TYPE-1` (resp. `TYPE#1`) with the value field `TYPE-1_val` (resp. `TYPE#1_val`) and the attribute field `source_attr`. Even if the attribute were missing, the element `TYPE` could occur multiple times within `TYPEDEFINITIONS` with different values. > [!WARNING] > **IMPORTANT:** > > The suffixes *_val* and *_attr* are always placed after the suffixes for uniqueness (see `TYPE-1_val`, `TYPE-1_attr`, `TYPE#1_val` and `TYPE#1_attr`). XML (Extensible Markup Language) is a structured text format for storing and exchanging data. Content is enclosed within freely definable tags such as `<order>`. XML is human-readable, machine-processable, and platform-independent. In the Lobster Data Platform, you can receive, parse, and generate XML data. Configuration in Phase 2, which determines the format of the input data. The document type determines how the parser reads the data and transfers it to the source tree. Examples: EDIFACT, XML, JSON, CSV, X12. A profile is the central configuration unit in the Lobster Data Platform. It receives data, processes it, and forwards it. Configuration is done graphically, with no programming required.