Xml Generator Documentation

About: XMLGENERATOR Activity

In Business Integration Solutions, use the XMLGENERATOR activity to convert Microsoft Dynamics BC record set into XML document.

Usage

Use this activity to generate an XML document containing data from Microsoft Dynamics BC.

Concept

Data from Microsoft Dynamics Business Central is exported based on various types of Events. This data is not structured. It is important that the data is first stored in a document format which is easy to process. For this we use the XML Generator activity.

Based on an internal document definition, the XML Generator activity reads the Microsoft Dynamics Business Central records and converts that into an XML document structure, which is UTF-16 character encoded. Connections can be triggered from various events. These events have a recordscope. From this scope, based on an internal document, an XML message is generated. The internal document's field nodes can be set to optional or mandatory. The XML Generator will skip the optional fields . An internal document table node might be marked as mandatory, which will result in the parent node to be filtered out if no related tables/records are generated due to missing relationship or other constraints. This has a cascade effect, meaning if all child nodes are mandatory, and no root record is generated, the XML generator activity will take the empty document action.

Internal document mandatory block

How To: Setup XML Generator Activity

Use the XML Generator activity to generate a filtered set of data in XML format which can be processed further by other pipeline activities.

To setup xml generator activity:

  1. Create an export connection and insert the element XMLGENERATOR.
  2. On the elements line, click Edit.
  3. On the Text to XML Translator setup, fill in the following fields:
Field Description
Document No. Specify the internal document
Skip Schema Validation Indicates if the resulted xml document should be validated against the internal document schema
Empty Document Action When no records can be generated the empty document action will be used
Error: The message will be set in an error state and further processing is halted
Cancel: The message gets cancelled, and the message will be removed
Continue: The pipeline will continue with an empty document
Parse Data Data that contains xml unsafe characters as well as double quotes will be evaluated and made xmlsafe for Text, Code and Variant (unspecified) fields. When disabled, only xml-unsafe characters will be escaped (e.g. < >)
  1. Click Check Configuration to see if there are any configuration errors.
  2. Click Ok.

XML Generator Setup