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.