In Business Integration Solutions, use the XML Minifier activity to clean an XML document of empty nodes and blocks that are not mandatory.
Set up the XML Minifier
.png)
Field | Description |
|---|---|
Document Type | Specifies whether the linked document is External or Internal. |
Document No. | Specifies the linked document. |
Examples
Example: Single-level document
This example uses a simple internal document based on the SalespersonPurchaser table. It contains two mandatory fields: GlobalDimension1Code and NextTaskDate.
.png)
The following connection retrieves test data for the XML Minifier:
Timer event > XML Generator > Mapper
Timer Event: exports a set of records from D365 BC.
XML Generator: maps the set of records to a readable XML structure.
Mapper: creates a mapped document to process with the XML Minifier. In this example, the same document is the source and target, with 1:1 mapping.
The XML document sent to the XML Minifier has the following structure. The mandatory node GlobalDimension1Code is empty, and the non-mandatory nodes GlobalDimension2Code and PhoneNo are empty as well.
HR
Helena Ray
0
false
HR@contoso.com
2024-01-20
11The XML document from the XML Minifier has the following structure. The empty mandatory node GlobalDimension1Code remains in the structure, while the non-mandatory nodes GlobalDimension2Code and PhoneNo are removed.
HR
Helena Ray
0
false
HR@contoso.com
2024-01-20
11Example: Multi-level document
This example uses a multi-level internal document based on the SalesHeader, SalesLine, and Item tables. The mandatory nodes are SalesHeader/YourReference and Item.

Using the same connection setup as example 1 but with the multi-level document, and with no node mapped inside the Item block, the document from the Mapper has the following structure.
30000
101005
10000
2
1920-S
ANTWERP Conference Table
The XML document from the XML Minifier has the following structure. The empty mandatory nodes SalesHeader/YourReference and Item remain in the structure, while the non-mandatory node JobNo and the nodes inside Item are removed.
30000
101005
10000
2
1920-S
ANTWERP Conference Table