XMLValidation Activity

The XMLValidation activity validates whether an XML document is an instance of the specified schema. The activity validates the XML file against an XSD without loading it into memory.

General Tab

The General tab has the following fields.

FieldLiteral Value/ Module Property/ Process Property?Description
NameNoThe name to be displayed in the process definition
DescriptionNoA short description of the activity
Input XML Source(Mandatory)NoThe format of the input XML source:
  • file name
  • input stream
  • output stream
  • binary
SchemaNoThe schema file to be used when validating the XML file.

Note: You can also specify a schema file name on the Input tab, if required. The schema specified on the Input tab overrides the schema specified on the General tab.

Input Tab

The input for the activity is the following.

Input ItemDatatypeDescription
fileNameStringThe path and name of the file.

This field is available only when File Name is selected as the Input XML source on the General tab.

Input StreamObjectReferenceInput Stream ObjectReference mapped from the output of the FileToStream activity.

It is available only when Input Stream is selected as the Input XML source on the General tab.

outputStreamObjectReferenceThe Output stream ObjectReference mapped from the GetFragment activity.

It is available only when Output Stream is selected as the Input XML source on the General tab.

BinaryBytesXML data in binary format to validate.

It is available only when Binary is selected as the Input XML source on the General tab.

schemaFileName

(Optional)

StringThe location and filename of the schema file to be used when validating the XML file.

Note: The schema specified on the Input tab overrides the schema specified on the General tab.

Fault Tab

The Fault tab lists the possible exceptions that can be thrown by this activity. See TIBCO ActiveMatrix BusinessWorks Error Codes for more information about the error codes and corrective actions to take.

ExceptionThrown When...
FileIOExceptionThis error may be thrown when an XML file is being read from a stream.
FileNotFoundExceptionCannot find the file provided in the fileName parameter or schemaFileName parameter.
XMLSchemaValidationExceptionThis is a generic validation exception. This exception provides errors related to XML validation.