Write XML File

Operation Name

Write XML File

Function overview

Write input data file to XML file.

Data Model

Data model of this component is XML type.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required/Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Input data Required Not available Select the component on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
File Required Available Enter the path to XML files.

Click [Browse] button to activate the file Selectr and select the file.
Property Action
Item name Description Remarks
Preview Start the previewer, display the contents of the file specified in [File].
  • Disables when specified file dose not exist, or variables are set in [File].
  • Encode specified in [Encoding] is displayed.
  • You can not edit the file contents.
  • Files with file size smaller than 1MB can be displayed in previewer.If the file size exceeds 1MB, 1MB size contents from the beginning of the file are displayed.
Write settings
Item name Required/Optional Use of Variables Description Remarks
Encoding Required Available Select or input write file encode.

Use only the canonical name supported by Java SE Runtime Environment 8 when specifying the encoding directly in the field.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.
  • The default value is "UTF-8".
Overwrite Optional Not available If the specified file exists, Select whether to overwrite it or not.
  • [Checked]: (default)
    Allowed.
  • [Not Checked]:
    Does not allow.Error occurs if file already exists.
 
Indent Optional Not available Select whether you want to indent.
  • [Checked] :(default)
    Indentation.
  • [Not Checked]:
    Performed indentation.
 
Output type
Item name Required/Optional Use of Variables Description Remarks
Type Required Not available Select the output format.
  • [XML]:(default)
  • [HTML]:
  • [XHTML]:
 
Specify DTD Optional Not available Select whether the DTD is specified.
  • [Checked]:
    Specifies a DTD.
  • [Not Checked]: (default)
    Does not specify the DTD.
  • If the [XHTML] is selected in the [Type], this is checked and can not be edited
Public identifier Optional Available Enter the public identifier.
  • Enabled when [XML] is selected in [Type] and [Specify DTD] is checked.
System identifier Required Available Enter the system identifier.
  • Enabled when [XML] is selected in [Type] and [Specify DTD] is checked.
Overwrite DTD Optional Not available Select whether the Overwrite DTD.
  • [Checked]:
    Overwrite the DTD.
  • [Not Checked]: (default)
    DTD does not overwrite.
  • Enabled when [XML] is selected in [Type] and [Specify DTD] is checked.
DTD Optional Not available Select the DTD.
  • [Type] [HTML] If you Select
    • [HTML 4.0.1 Strict DTD]:
    • [HTML 4.0.1 Transitional DTD]:
    • [HTML 4.0.1 Frameset DTD]:
  • [Type] [XHTML] If you Select
    • [XHTML 1.0 Strict DTD]:
    • [XHTML 1.0 Transitional DTD]:
    • [XHTML 1.0 Frameset DTD]:
  • Enabled when [HTML] or [XHTML] is selected in [Type] and [Specify DTD] is checked.
Transaction
Item name Required/Optional Use of Variables Description Remarks
Execute transaction processing Required Not available Select whether to perform transaction processing.
  • [Checked]:
    Perform Transaction processing.
  • [Not Checked]: (default)
    Do not perform transaction processing.
Refer "File Type adapter transaction " for more information .
 
Comment
Item name Required/Optional Use of Variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

Depends on the data to write.

Output Schema

None.

Loading schema in Mapper

Schema needs to be reloaded manually.
Please specify the schema of the data to be written.
Refer to "Edit Schema"

Transaction

Transaction is supported.

Transaction is enabled only when [Execute transaction processing] in [Transaction] is checked.

PSP Usage

PSP is not supported.

Available Component variables

Variable name Description Remarks
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception name Cause Solution
InputDataNotFoundException [Input data] is not specified. Specify the [Input data], or draw the data flow.
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify the [<Property name>].
FileIsDirectoryException Path input in [File] is directory. Input file path in [File].
FileAlreadyExistedException File specified in [File] already exists. Put check in change file name of [File], or [Overwrite] of [Write settings].
FileIsLockedException File specified in [File] is locked. Please go to Windows Explorer or CLI to unlock.
java.io.FileNotFoundException
Another processing is in use.
File specified in [File] is being used by another process. Please check whether it is used by other processing.
java.io.UnsupportedEncodingException Encoding that are not supported in [Encoding] are specified. Specify an encoding that is supported in Java SE Runtime Environment 8.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.