XML Parser Stage
The XML parser stage parses whole XML documents by default, but it can also be configured to parse only specific nodes without loading the entire document into memory. It can also split an XML document into multiple documents. XPATH-like expressions are used to select specific nodes to parse, such as /posts/row
or /posts/record
. Nested XML elements are flattened.
To create new documents from selected elements, configure rootPaths
.
|
The XML Transformation index pipeline stage is deprecated in favor of this parser stage.
|
|
When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.
|
Parse xml content with optional splitting
id - string
Default: e46a6bb7-da45-48d8-aebe-b4afc5690b16
label - string
A label for this Parser Stage
<= 255 characters
enabled - boolean
Default: true
mediaTypes - array[string]
Documents with a media type on this list will be matched by this parser stage. See inheritMediaTypes / use default media types for more.
inheritMediaTypes - boolean
Each parser stage has a built-in list of media types it handles by default. If this setting is true, that list will be used along with any optional additional types provided in the mediaTypes list. If this setting is false, this stage will only be selected for media types in the mediaTypes list, and the mediaTypes list becomes a mandatory property which must have at least one valid media type.
Default: true
pathPatterns - array[object]
Specify a file name or pattern that must be matched for this parser stage to run. Forward slashes ("/") are used to join names of files inside archives with the archive name.
object attributes:{syntax
: {
display name: Pattern type
type: string
}pattern
: {
display name: File name or pattern
type: string
}}
errorHandling - string
Default: mark
Allowed values: ignorelogfailmark
outputFieldPrefix - string
Fields extracted by this parser will be prefixed with this string. The remainder of the field name will be as detected in the stream
<= 20 characters
Match pattern: ^$|^[A-Za-z_][A-Za-z0-9_\-\.]+$
rootPaths - array[string]
Read XML elements that can be found on specified XML paths and parse them into separate documents
Default: "/"
maxSize - integer
Maximum number of XML characters, excluding extra whitespace, that will be processed from each source document node to produce an output document
Default: 65536
listHandling - string
Create a single multivalued field containing all items, or a separate index-numbered field per list item?
Default: multivalued
Allowed values: multivaluedindex_numbered
type - stringrequired
Default: xml
Allowed values: xml