Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Attribute Rule

Regular Expression Grooper.Messaging

Configures how attributes are applied to HTML elements during Condition HTML processing.

Remarks

An Attribute Rule allows you to add or modify attributes on HTML elements that match a CSS selector and (optionally) a text pattern.

This is commonly used to:

  • Add semantic or metadata attributes (such as data-section, role, or class)
  • Tag elements for downstream extraction, styling, or analytics
  • Highlight or categorize content in HTML for RAG/LLM or search scenarios

You can specify both the selector and the attributes to apply. The rule can also use a regular expression to further filter which elements receive the attributes based on their text content.

Example:
To add a data-section="main" attribute to all <section> elements, set:

  • 'ElementSelector' = "section"
  • 'Attributes' = "data-section=main"

Properties

NameTypeDescription

Used By

Notification