General Specifications for XML Files
Follow these specifications for all IEX WFM Integrated import files that require XML formatting. An element or file that does not meet these specifications is invalid.
Content Type |
Specification |
---|---|
File Elements |
All elements must be nested within the root element. The root element for each import type is described in the article for that import.. The import will fail if:
|
Element Type Declaration
|
When using the Document Type Definition (DTD) to create a file, keep in mind these considerations about element type declarations: <!ELEMENT elementName (childElement, childElement, ...)> When an element is defined with a list of child elements separated by commas, the children must appear in the same order in the import file. Otherwise, the element will not be valid. <!ELEMENT elementName (#PCDATA)> Elements with the #PCDATA type may contain any text string. Data import validates the text as necessary. The DTD for each XML import file is defined in the topic for that import file type. |
Element Qualifiers |
The DTD uses standard XML element qualifiers:
|
Element Attributes |
Follow standard XML attribute rules. Attributes must be contained in double quotes. If an attribute marked as #REQUIRED in the DTD is missing from the associated element, the element is not valid. |
Comments |
Enter comments in this format: <!-- comment text -->
|
Standard XML Rules
The data import file must be a valid, well-formed XML document based on XML standards. If the import file is not well-formed, the import will fail.
All standard XML formatting rules must be followed, including:
-
The file must begin with an XML declaration:
<?xml version=”1.0”?>
If the database contains international characters, the declaration must contain an encoding parameter, as shown in this example.
<?xml version="1.0" encoding="UTF-8"?>
The import will fail if the encoding of the data file is in ANSI format. The data file must be UTF-8 encoding.
- There must be one root element in each import file. Refer to the article for the import type for details.
- Each element must consist of an open tag (
<tagName>
), a close tag (</tagName>
) and the element content. The valid content of each element is defined in the Document Type Definition (DTD) for each data import. -
Element tags are case sensitive.
-
Elements can be nested, but they cannot overlap. This example shows properly nested elements:
<tag1><tag2>the Data</tag2></tag1>
This example shows overlapping elements and would result in an error:
<tag1><tag2>the Name</tag1></tag2>
- Blank space is ignored unless it is part of a text string (#PCDATA). The data import file can contain blank space, empty lines, or tabs between elements.
-
Tags and child elements can be on the same line or on separate lines. Both of these examples are acceptable:
Example 1
<tag1><tag2>the Data</tag2></tag1>
Example 2
<tag1>
<tag2>
the Data
</tag2>
</tag1>