XML types

Kofax Import Connector can be configured to identify XML documents with a particular namespace and root element. The combination of a namespace and root element is referred to as an XML type. Importing of each XML type can be handled differently.

Use the following commands from to manage the XML types:

  • Add XML Type: Click to define a new XML type. You are prompted to provide an XML schema definition file (.xsd) and a matching sample XML document.

  • Remove XML Type: Select an XML type in the table and click this button to delete it.

  • Open XML Sample Data: Opens the sample XML document in the default application associated with the XML files.

To define an XML type, provide the XML schema definition file and a sample XML document. XML types can be used in the following situations:

There is a built-in XML type called ImportSession. The purpose of this XML type is to support the standard Kofax Capture XML Import Connector compatible XML format. You do not need to import this XML type, it is available automatically.

  1. Start KC Plug-In configuration. Do one of the following
    • On a Kofax Capture Network Server remote site, start KC Plug-In from the KIC - Electronic Documents group in the Windows Start menu.

    • On other Kofax Capture installations, start Kofax Capture Administration and select Electronic Documents > Configuration.

  2. Go to the XML Types tab.
  3. On the XML Type Tasks menu, click Add XML Type.
  4. Browse to your XML schema definition file (.xsd).
  5. Browse to a sample XML file that uses the specified schema.

Now you can create a destination that uses this XML type. See Destinations Tasks.

Additional information about custom XML types can be found in the Kofax Import Connector Developers Guide.

Kofax Import Connector does not change the logical structure of the XML documents, but the text presentation is often modified:

  • The XML code page is changed to UTF-8.

  • Insignificant whitespace can be removed or changed.

  • Character quotes or CDATA sections can be removed or changed.

Validating XML types in Message Connector

Message Connector can be configured to reject received XML documents that cannot be validated against an XML schema. This feature is primarily useful for web service input, where the invalid document is immediately rejected and the web service sender is informed about the reasons (failed validation). However, it applies to documents from all connectors, that is, non-valid XML will not be imported to Kofax Capture.

  1. Copy the C:\ProgramData\Kofax\KIC-ED\KCPlugIn\XMLTypes folder from the KC Plug-In computer to the Message Connector installation folder (by default, <programs>\Kofax\KIC-ED\MC\). You need to repeat this step whenever you change the configured XML types in KC Plug-In.

    The built-in XML type called ImportSession (standard Kofax Capture XML Import Connector compatible format) is available on Message Connector automatically, that is, if you are not using custom XML types, you can skip this step.

  2. Start Message Connector Configuration utility from the Kofax Import Connector group in the Windows Start menu.
  3. Go to the Structured (XML) Input Handling tab.
  4. In the Types field, enter a comma or blank separated list of MIME types or file extensions that should be treated as XML documents for the purpose of automatic schema validation. This setting applies to import from email and folder (binary and XML file import mode only).
  5. In the Schema Validation field, select one of the options:
    • Disabled: If you do not want Message Connector to validate XML documents. All incoming XML documents are handled according to the configuration in KC Plug-In.

    • Optional: If you want to validate XML documents for which an XML type has been defined. Documents that have a defined XML type but are not valid are handled according to the setting of the If Validation Fails parameter.

    • Required: If you want to validate all XML documents (a matching XML type must exist). Documents that do not have a matching XML type as well as documents that have fail validation are handled according to the setting of the If Validation Fails parameter.

  6. In the If Validation Fails field, select what to do when an XML document is not valid:
    • Do not apply XML handling: To treat the document as a non-XML document. It is also marked with a document conversion error.

    • Reject the message: To mark the document as invalid. Such documents are not imported to Kofax Capture. In case of web service input, the sender is immediately informed about the reason of rejection. Even invalid documents are temporarily stored in Message Connector for troubleshooting.

  7. Click Save.
  8. Click Exit and restart service.