Places a new HTML element in the existing HTML DOM. The desired position for the new HTML element is specified by using CSS selector syntax. The incoming HTML is first converted into a HTML Document Object Model so that HTML DOM location may be located in a similar manner that CSS selectors are used to apply styles to HTML. The resulting HTML DOM is then “queried” using the user defined CSS selector string to find the position where the user desires to add the new HTML element. Once the new HTML element is added to the DOM it is rendered to HTML and the result replaces the flowfile content with the updated HTML. A more thorough reference for the CSS selector syntax can be found at “”


put, html, dom, css, element


In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the Expression Language Guide.

Name Default Value Allowable Values Description
URL Base URL for the HTML page being parsed.
CSS Selector CSS selector syntax string used to extract the desired HTML element(s).
Supports Expression Language: true
HTML Character Encoding UTF-8 Character encoding of the input HTML
Element Insert Location Type append-html * append-html
* prepend-html
Controls whether the new element is prepended or appended to the children of the Element located by the CSS selector. EX: prepended value '<b>Hi</b>' inside of Element (using CSS Selector 'p') '<p>There</p>' would result in '<p><b>Hi</b>There</p>'. Appending the value would result in '<p>There<b>Hi</b></p>'
Put Value Value used when creating the new Element. Value should be a valid HTML element. The text should be supplied unencoded: characters like '<', '>', etc will be properly HTML encoded in the resulting output.
Supports Expression Language: true


Name Description
element not found Element could not be found in the HTML document. The original HTML input will remain in the flowfile content unchanged. Relationship 'original' will not be invoked in this scenario.
original The original HTML input
invalid html The input HTML syntax is invalid
success Successfully parsed HTML element

Reads Attributes:

None specified.

Writes Attributes:

None specified.

See Also:

GetHTMLElement, ModifyHTMLElement