Validate XML File Action

Description

Validates that an XML file in session is well-formed, schema compliant or DTD compliant. A valid document conforms to some semantic rules. These rules are either user-defined or included as an XML schema or DTD. For example, if a document contains an undefined tag, then it is not valid; a validating parser is not allowed to process it.

Declaration

<AMXMLVALIDATION VALIDATIONTYPE="text [options]"><Schema FileName="text" /></AMXMLVALIDATION>

Example

<AMXMLVALIDATION VALIDATIONTYPE="DTD" />

<AMXMLVALIDATION />

General Tab Parameters

Validation type: Allows you to specify the type of validation you want the in-memory xml document to pass through.

  • Well-Formed-- Specifies that the XML file conforms to the rules that govern a well-formed document. (Default) A well-formed document conforms to all of XML's syntax rules. For example, if an element has an opening tag with no closing tag and is not self-closing, it is not well-formed. A document that is not well-formed is not considered to be XML and a conforming parser is not allowed to process it.

  • Schema--Choose this option to activate the Schema Files option.

  • DTD--Choose this option to activate the DTD validation. Specifies that the XML file is a DTD file.

Text [options], Optional - Default "Well formed"
MARKUP:VALIDATIONTYPE="Schema"

Schema: Specifies the schema files to validate against an in-memory XML document. Available only when Validation Type combo box is set to Schema.

Text, Required
MARKUP: <Schema FileName="C:\NA\XML\XML Example\Schema\cd-database.xsd" />

Add: Adds new schema file to the list against which in memory xml file will be validated.

Remove: Removes a schema file from the list.

Session name: Specifies the session name to run the XML file in subsequent XML steps. This allows several connections to be active simultaneously.

Text, Optional - Default "XMLSession1"
MARKUP: SESSIONNAME="FirstXMLSession"

See Also

Sign XML File Action, Output XML File Action, Verify XML File Action