XML

The XML Stream is used to process the XML Stream.

Stream property

Property name Value
DTD SystemId in the XML Statement Specify the SystemId for describing as the DOCTYPE Statement.
※If the XML imported from external has the DOCTYPE Statement, the specified value is assigned here.
Import external entities Specify whether to import the external entities or not. For the external reference, please refer to the below "External Reference".
Yes Import external entities,and open entity reference.
No Don't import external entities, and don't open entity reference.
Verify validity by DTD Specify whether to verify validity by DTD or not. For external reference, please refer to the below "External reference".
Yes Verify validity by DTD.
If the SystemID has been specified, you can use the DTD. When there was a validation error occured, error happens. When DTD is an external entity, select "Yes" for the "Import external entity" property.
No Don't verify validity by DTD.
Output encoding Specify a stream's encoding. The encoding has been described in the XML, so when read a stream from the external, it doesn't matter that it's different with the actual encoding.
utf-8 unicode utf-8
shift_jis Shift JIS
euc-jp EUC-JP
iso-2022-jp ISO-2022-JP
utf-16 unicode utf-16
Windows-31J Windows-31J
Linefeed Code Specify the linefeed code in the XML.
※CR can't be specified.
Don't convert Convert into the platform stantard linefeed code.
CR+LF Convert to CR+LF.
LF Convert to LF.
Formatting of output Specify formatting of output.
Don't format Don't format
Delete extra space Delete whitespace-only nodes (including linefeed code).
Indent Delete whitespace-only node (including linefeed code), and indent it.
Describe the XML Statement when output Specify whether to describe the XML Statement or not when output.
Yes Describe the XML Statement when output.
No Don't describe the XML Statement when output.
Use an empty element tag Specify whether to use an empty element tag for outputing the empty element or not.
Yes Output an empty element by empty element tag.
No Output an empty element with a pair of consuctive element tags.
Name space Specify the name space. For the specifying way, please refer to the "Name space property".

Name space property

When use the name in which Prefix is following to the element name or the property name, it's necessary to specify the Prefix with the name space property. If it's not specified, error will happen.

When the default name space is used, enter "#default" to the Prefix field.

You can specify the name space according to the below steps.

External reference

When describe DTD and entity's external reference as the relative URI, take DTD system standard directory as a start. DTD system standard directory's initial value is [INSTALL_DIR]/flow/services/flowservice/dtd.

Example

To verify the XML with the DOCTYPE Statement as below, it's necessary to put test.dtd to the above dtd directory.

<!DOCTYPE test SYSTEM "test.dtd">

Field definition

Define the field name, data type, repeat, node type, display name.

Field name Specify element name or property name.
Data type An arbitrary one from String, Boolean, Integer, Double, Decimal, DateTime. Binary can't be specified.
Repeat Specify whether to repeat an element or not. "Repeat" can't be specified for the top element and property. Moreover, if you define the same element in the same level, "repeat" can't be specified for the element.
Node type Select element or property.
Display name Specify display name in mapper. If the element name and the property name which are field names are not clear, by displaying the field name by the display name to refer in the mapping window, you can do the mapping clearly.

Caution

The XML's hierarchical structure is represented by the XML's field definition directly. Please take a care of the below points.

  • There is 1 top element only.
  • The same element can be defined in the same level.
  • The same property can't be defined in the same level.
  • The mutiple same elements are defined in the same level, you can specify "exist" for the "Repeat" field.

Field name

The field name is the XPath format from root. If there are multiple same elements in the same level, an index will be added.

XML field definition's example

NameRepeatNode typeField name※1
rootNoneElement/root
  recordExistElement/root/record
    attr1NoneProperty/root/record/@attr1
    element1NoneElement/root/record/element1[1]
    element1NoneElement/root/record/element1[2]
    element2NoneElement/root/record/element2
      x:element3 ※2ExistElement/root/record/element2/x:element3

※1 Actually, use can't use the field name directly.
※2 For Prefix"x", any NamespaceURI should be defined.

Field value

If the "Node type" is an element, the field value is the element's content. If the "Node type" is a property, the field value is the property's value. If there is no element to match the field definition or there is no property, it's null. The field value of the element which has subelements will be a string that element's text part are connecting.

If the XML is as below, the element value will be "abcdefghi".

<p>
  abc
    <a href=”http://foo.bar/”>
    def
    </a>
  ghi
</p>

Record number

A stream's record number is decided by the repeatable element as below.

 

To the top of this page