Was this helpful?
XML-DMS
XML-DMS is a single mode connector that provides source and target connections to XML files. It is easy to create and maintain a Map that uses a single mode connector.
Note:  The traditional XML-DMS connector has been renamed to XML-DMS Multimode in DataConnect 12.0 and later versions, to better align capabilities with other Multimode connectors. When you load an existing Map that was created when XML-DMS referred to a multimode connector, the target will automatically select XML-DMS Multimode connector.
Note:  On the Mapping Tab, In the target grid, when there are multiple record types and the filter is selected as “All Fields”, editing is disabled because this can create a mix of records and fields. You need to select a specific record type in the filter box and then you can edit that record type's fields.
Namespace support
Field names include the namespace prefix (if it is provided). When reading, namespace declarations (xmlns attributes) are ignored. When writing, check is not performed. Therefore, the schema may provide namespace declarations as appropriately named or typed fields.
Connector Parts
Connector parts are the fields you configure to connect with a data source or target.
The settings that are available depend on the connector you select.
For a list of all parts for source connectors, see Specifying Connector, Parts, and Properties.
For a list of all parts for target connectors, see Specifying Connector, Parts, and Properties.
Connection Properties
You can specify the following source (S) and target (T) properties:
Property
Type
S/T
Description
Batch Size
Number
S
Number of records to be read at one time.
0 indicates that all records must be read.
If a value greater than 0 is set, due to document structure constraints, more records may have to be read.
Default value is 1000.
Namespace Prefixes
Boolean
S
Determines whether to include namespace prefixes
in generated field names.
Default value is TRUE.
When using this property, do not set the Schema Location and No Namespace Schema Location
properties. If either of those properties is
set, then set the Namespace Prefixes property to FALSE.
FlushFrequency
Number
T
Number of records buffered in the memory before being written to the target connector.
Default value is 0 (all records are written at once).
When inserting many records, change the default to a higher value to improve performance.
Batch Response
Filename
T
Sets the path name for a batch response file.
Caution!  Do not use this property. It is included only for backward compatibility.
Formatted
Boolean
T
Determines whether the output should be formatted.
TRUE (default): Each element starts on a new line, with the hierarchy shown by indentation of two spaces per level.
FALSE: Output is written in the XML document body without line breaks or indentation.
Use Empty Tag
Boolean
T
Determines the syntax for empty elements.
TRUE (default): Empty elements are written as <element/>.
FALSE: Empty elements are written as <element></element>.
Write Empty Fields
Boolean
T
Determines whether empty fields are written. Empty means they contain an empty string, are null, or are not set.
TRUE (default): Empty fields are written.
FALSE: No elements are written for empty fields.
Write Empty Attributes
Boolean
T
Determines whether empty attribute fields are written as an attribute. Empty means they contain an empty string, are null, or are not set.
TRUE (default): Empty attribute fields are written.
FALSE: A tag is not written if it contains no data.
Encode all special characters
Boolean
T
Determines whether to encode all special characters:
TRUE: Encodes all five special characters (plus CR/LF/TAB in attributes), not just those necessary for valid XML.
FALSE (default): Does not encode the five special characters.
HTTP Write Method
-
T
Determines the write method for an HTTP or HTTPS target, when the output file is a URL. You can choose from POST (default) or PUT.
Write Namespaces
Boolean
T
Enforces writing of namespace attributes or prefixes.
Default value is TRUE.
Namespace Map
Text
T
Allows you to enter the namespace mappings of the form pfx:namespace. Separate multiple values with newlines or spaces.
Default Namespace
Text
T
(Optional) Sets the default namespace for the xmlns attribute.
Schema Location
Text
T
(Optional) Sets the xsi:schemaLocation attribute on the root element.
No Namespace Schema Location
Text
T
(Optional) Sets the xsi:noNamespaceSchemaLocation attribute on the root element.
Generate Prefixes
Boolean
T
Generates namespace prefixes or redefine the default namespace as needed.
Default value is TRUE.
Prefer Type Substitution
Boolean
T
Enables type substitution or element substitution for polymorphism if both are usable.
Default value is TRUE.
Write XML Decl
Boolean
T
Enables writing of first line of XML encoding declaration.
Default value is TRUE.
Supported Output Modes
XML-DMS connector supports the Replace output mode. For more information, see Target Output Modes.
Supported Data Types
The following data types are supported. For each type, there is a corresponding "attribute" type to indicate the field is an attribute rather than an element. An example of this is a Boolean attribute.
Boolean
Byte
Bytes (base64-encoded)
Char
Date
DateTime
Decimal
Double
Float
Int
Long
Short
String
Time
Error Conditions, Handling, and Recovery
The following are the most common errors when working with XML as a source.
Schema mismatch: The dataset schema does not match the map schema.
Field type errors: The data type for a field was read incorrectly.
The following are the most common errors when working with XML as a target.
Sequencing issue: Records are inserted in an incorrect order.
Cardinality issue: Multiple instances of a record type are written when only one record type is allowed.
Using a DJMessage Object as a Source or Target
You can use DJMessage objects as source and target files for the XML-DMS connector. When you create the dataset, use the DJMessage:///[name of message object] URI scheme in the File/URI field for the dataset. You cannot establish a connection to the data source because the integration platform engine cannot connect directly to the message object.
You can save the dataset with the DJMessage URI reference or specify the DJMessage URL with a macro that points to the DJMessage object file. If you use a macro, you must change the macro value to the DJMessage URL in the run-time configuration. For information about DJMessage Object Types, see DJMessage Object Type.
Using a URL as a Source or Target
You can use HTTP and HTTPS URLs as source and target files for the XML-DMS connector. When writing to a URL, you can set the HTTP Write Method property to POST (default) or PUT.
Last modified date: 02/09/2024