HTML Mask (HtmlMaskGenerator)
Last updated
Was this helpful?
Last updated
Was this helpful?
The generator masks text columns. It parses the content as HTML, and applies sub-generators to specified path expressions.
If a sub-generator application fails because of an error, then Structural applies the fallback generator instead.
For the HTML Mask generator, there is a link object for each XPath expression value to assign a generator to.
The generator does not itself support consistency or differential privacy.
The metadata
object is populated from the object. It includes:
pathExpression
, which is the XPath expression that identifies the value to apply the sub-generator to.
The subGeneratorMetadata
object, which identifies and configures the sub-generator.
In the following example replacement for the HTML Mask generator:
The Character Scramble generator is assigned to the value of the XPath expression //p
. Consistency is disabled.
The Company Name generator is assigned to the value of the XPath expression //p/@data
. Consistency is disabled.
In the case of an error applying either of those generators, the fallback generator is the Constant generator, which sets the value to 10
.