Skip to main content

xSuite Interface Windows Prism 5.x – Online Help

Input Format "Xml"

This input format supports splitting an XML file representing a batch of documents into the individual documents, and to extract or add related file attachments to the XML file.

Property

Description

InputFormat[].DocNode

Definition of the node in an XML file, based on which this file will be split into separate document-specific parts (optional)

By default, an XML file is assumed to contain one single document.

When splitting, the original document is discarded and a copy of the original document is generated instead for each new partial document. The document-specific part of the original XML file is added to the copy as another attachment.

The split documents generated are given the name suffix .splitN, in which N represents a serial number.

The syntax to use for specifying the property is XPath, which is the same syntax used for extracting index data (see XML index data reader). For example, if the XML file contains multiple Document nodes containing the individual documents, the property value might be /Root/Document.

<Root> <Document>…</Document> <Document>…</Document> </Root>

InputFormat[].AttachFileMode

Mode determining how additional file attachments are extracted from or added to the XML file:

  • None: no extraction/addition (default value)

  • Name: based on the name of the XML file

  • Reference: based on the reference in the XML file

  • Embedded: binary data embedded in the XML file

The Name and Reference modes require that the XML file be input via the file system, since the additional file attachments are also searched for only in the file system.

InputFormat[].AttachFileNode(*)

This property applies to the Reference and Embedded modes.

Subparameters in XPath syntax for defining the XML nodes that contain file attachment data:

  1. File*: relative/absolute file path or Base64-encoded binary data of the file attachment

  2. Name: name of the file attachment

  3. Type: type or MIME type of the file attachment

Parameters 2 and 3 only apply to the Embedded mode. Specify them relative to the node defined in parameter 1.

Further subparameters of freely selectable names are permitted. These parameters are added to the file attachments as metadata.

InputFormat[].AttachFileRefMacro(*)

Field macro expression that must return a file name or name pattern in Name mode, optionally with relative/absolute folder path, to find the file attachments

This expression can optionally also be used in Reference mode to prepare the extracted value in terms of content.

In the macro expression, you can use file variables like FilePath, FileName and FileBaseName, which refer to the XML file. For example, @FileBaseName + ".pdf" can be used to reference a PDF file which has the same base name as the XML file.

InputFormat[].RemoveXmlNs

Boolean value determining whether namespace information contained in XML files will be removed from them before parsing, to avoid related parsing problems

If need be, XPath expression for referencing nodes are then to be specified without the namespace prefix.

Default value: TRUE

Caution

If namespaces are retained, XML documents are not readable if they use a standard namespace (without a prefix), e.g., for the root node.