Insert Content

This step inserts a new tag and the specified content into a document, relative to the found tag.

The step only works on XML variables. This step neither validates the XML nor resolves entities.

The user interface path is Action > XML > Insert Content.

Properties

Configure the properties for the Insert Content step.

New Content

Click the down caret to select from the New Content options:

  • Value

  • Variable

  • Generate From Variable

  • Expression

  • Converters

Value
Enter or select a fixed value.
Variable
Select the value of a variable.
Generate From Variable

Generate XML from any type of variable, including binary and XML. This option is most applicable and useful for complex variable types.

If text is inserted (for example, from an attribute) containing characters that are illegal in XML, then these are encoded with an ampersand. For example: "<".

This result differs from when a variable is inserted directly. In those cases it must be encoded explicitly. The difference occurs because when you insert from a variable, the content must be XML coded (for example, "<t>&gt;</t>"), but when you use the Generate From Variable, it does not have to be XML coded because it is generating the XML.

Configure the following properties:

  • Variable to Format

  • Date Format Locale

  • Date Format Pattern

  • Include Empty Values

Expression
Enter an expression.
Converters
Select a list of data converters , whose output is used as the value. (The input text to the data converters is empty.)
Insert Tag Where

Tags can not be inserted in a text node. Instead, the surrounding tag must be selected.

Choose where to insert the new tag relative to the found tag:

  • As First Child of Found Tag
  • As Last Child of Found Tag
  • Before Found Tag
  • After Found Tag
Set as Named Tag

Select this property to set a named tag on the item, and choose a method.

Auto

Gives the item a name, which is a number. The first auto-numbered item is 1, the next is 2, and so on.

Named

Gives the item a fixed and explicitly stated name.

See Named Tags, Ranges, and JSON for details.