[en] Configuring XML filter

目前还没有官方翻译。

[en] XML Filter

[en] To learn more about filters in general, see section Understanding Filters.

[en] Use this filter whenever a trigger receives XML-encoded data. The filter allows you to extract individual fields, fields in repeatable sub areas, and even name-value pairs. XML structure defines elements and sub elements, attributes and their values, and textual values (element values).

[en] While you can define the structure of the XML file by yourself, NiceLabel recommends you to import the structure from the existing sample XML file. Click Import Data Structure button on the ribbon. After you import the XML structure, the Data Preview section displays the XML contents. It also highlights the elements and attributes that you define as output fields.

[en] For XML data examples, see section XML Data.

[en] Defining XML Fields

[en] If you define XML fields, you make values of selected items automatically available. Filter definition makes such fields available for mapping to variables in actions. This allows you to extract values of elements or attributes.

[en] To define an item value as field, do the following:

  1. [en] Select the element or attribute in the structure list.

  2. [en] For Usage, select Variable value.

  3. [en] The item is displayed on the structure list with bold letters, indicating that it is in use.

  4. [en] The element or attribute name is used as output field name.

  5. [en] The Data Preview section highlights the value of the selected item.

UUID-135a1d20-812d-0a32-36a5-733c475fb1a5.png

[en] Defining Repeatable Elements in XML Filter

[en] If an XML element occurs in XML data for multiple times, it is a repeatable element. Usually, a repeatable element contains data for a single label. To indicate that you want to use data from all repeatable elements, and not just from the first one, define the element as a Data block and enable the Repeatable element option. If the filter contains definition of elements defined as data block / repeatable element, the Use Data Filter action displays repeatable elements with nested placeholders. All actions nested below such a placeholder execute only for data blocks at this level.

[en] Defining XML Assignment Area

[en] XML filter automatically identifies fields and their values in the received data. This eliminates the need for manual variable-to-field mapping.

UUID-deb86d18-4462-08c0-e508-0ed2be928521.png