Unmaintained and planned for removal in version 2.0
Please consider using one the following alternatives: No alternative components suggested.
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 "http://jsoup.org/apidocs/org/jsoup/select/Selector.html"
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 NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
CSS Selector | CSS Selector | CSS selector syntax string used to extract the desired HTML element(s). Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | ||
HTML Character Encoding | HTML Character Encoding | UTF-8 | Character encoding of the input HTML | |
Element Insert Location Type | Element Insert Location Type | append-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 | 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 (will be evaluated using flow file attributes and variable registry) |
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. |
success | Successfully parsed HTML element |
original | The original HTML input |
invalid html | The input HTML syntax is invalid |