Skip to main content

DomCondition

Evaluates to true when a CSS selector matches an element in an HTML or XML document.

Notes

Evaluates to true when a CSS/jQuery-style selector matches an element in an HTML or XML document. The matched element's text or attribute value can be further evaluated against a value matcher.

Usage

class: DomCondition
contentTypeMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
extract: string
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
label: string
parser: string
selector: string
sourceCharset: string
valueMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false

Properties

PropertyTypeRequiredDefault
contentTypeMatcherTextMatcherNoTextMatcher
extractstringNo-
fieldMatcherTextMatcherNoTextMatcher
labelstringNo-
parserstringNohtml
selectorstringNo-
sourceCharsetstringNo-
valueMatcherTextMatcherNoTextMatcher

Property Details

contentTypeMatcher

Restricts processing to documents whose content type matches the specified pattern. When not set, the handler applies to all content types.

extract

Specifies what to extract from the matched DOM element (e.g., text, html, outerHtml, ownText, data, id, tagName, val, className, cssSelector, or attr(attributeKey)).

fieldMatcher

Matches document fields based on specified patterns and methods. Use this to restrict the handler to operate only on fields whose names satisfy the matcher criteria.

label

An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing — it exists purely to help identify this step, for example in large configurations or in the visual configurator.

parser

Specifies whether to use the HTML or XML parser when reading document content into a DOM tree.

selector

A CSS or jQuery-like selector expression identifying which DOM elements to target.

sourceCharset

Sets the character encoding of the source document to ensure proper reading and processing.

valueMatcher

Matches document field values based on specified patterns and methods. Use this to restrict the handler to operate only on fields whose values satisfy the matcher criteria.