User Guide : Map Connectors : Source and Target Map Connectors : XML-DMS
 
Share this page             
XML-DMS
This connector is used to read and write XML files. When used as a target, multimode operations are used instead of the Replace and Append output modes.
Normally, schemas for target multimode connectors are not provided. However, for XML-DMS connector:
If the target file exists, the UI connects using a source XML-DMS Connection and then the schema is copied to the target. The schema is built from the data, which may be a subset of the actual schema.
If the target file does not exist, then the following is performed:
1. Automatically create a target record with one field and then you can drag-and-drop the source fields to the target.
2. Use an external schema (created using Schema Editor or saving the schema from a map source or target). If you use this method, it will replace the automatically created target record.
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.
Property Options
These are properties that you may need to specify for your source or target data.
 
Property
Type
ST
Use
Batch Size
Number
S
Sets the number of records to be read at one time. A value of 0 means to read all. If a value greater than 0 is set, due to document structure constraints, more records may actually have to be read. Default is 1000.
Namespace Prefixes
Boolean
S
Determines whether to include namespace prefixes in generated field names. Default is true. Use of namespace prefixes requires that the schemaLocation and noNamespaceSchemaLocation properties are not set. If either of those properties is set, then set this property to false.
FlushFrequency
Number
T
Number of record inserts to buffer before sending a batch to the connector. Default is zero. If you are 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
Sets whether the output should be formatted. If true, each element starts on a new line, with the hierarchy shown by indentation of two spaces per level. If false, output is written in the XML document body without line breaks or indentation. Default is true.
Use Empty Tag
Boolean
T
For empty elements, use an empty tag or start or end a tag pair. If true, empty elements are written as an empty element as <element/>. If false, empty elements are written as a start element/end element pair <element></element>. Default is true.
Write Empty Fields
Boolean
T
Write elements as empty fields. The default is true. If true, empty fields are written. Empty means they contain an empty string, are null, or are not set. If false, no elements are written for these fields. Default is true.
Write Empty Attributes
Boolean
T
Write attributes as empty fields. The default is true. If true, empty attribute fields will be written as an attribute. Empty means they contain an empty string, are null, or are not set. If false, no attribute is written for these fields.Select False to suppress writing the tag when it contains no data. Default is true.
HTTP Write Method
-
T
To write to an HTTP target, select POST or PUT. Default is POST.
Write Namespaces
Boolean
T
Enable writing of namespace attributes or prefixes. Default is true.
Namespace Map
Text
T
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
Generate namespace prefixes or redefine the default namespace as needed.
Prefer Type Substitution
Boolean
T
Use type substitution or element substitution for polymorphism if both are usable.
Write XML Decl
Boolean
T
Write the first line of XML encoding declaration. Default is true.
Data Types
These are the data types supported for fields in the XML connector. 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 or target.
Source
Schema mismatch: The dataset schema does not match the map schema.
Field type errors: The data type for a field was read incorrectly.
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 is unable to 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. See DJMessage Object Type for more information.