Using Insert node action

Use this action to insert a node in an existing XML file and assign it to a value. Optionally, assign a name space and attributes to the node.

Note: When you use the Insert node action, the attributes are alphabetically sorted and displayed in the XML output.

Procedure

To insert a node, do the following:

  1. Enter the session name.
    Use the name of the session that you have used in the Start XML session action.
  2. Specify an XPath expression to indicate where to insert the new node.
  3. Enter a node name.
  4. Enter a value for the node.
  5. If the node name exists, select from the following options:
    • Insert it anyways
    • Skip it
    • Overwrite it
  6. Specify the location to insert the node from the following options:
    • Beginning of the child nodes
    • End of the child nodes
    • Before specific child note
    • After specific child node
    If Before Specific child node or After Specific child node is selected, specify the child node name before or after which the node must be inserted.
  7. Optional: Enter the default name space to be mapped to the node.
    Note: The Insert node action currently does not support namespaces. If you specify a namespace prefix in this field, the prefix is ignored in the result document.
  8. Enter the attributes using a Dictionary-type variable.
    Create a new variable of type Dictionary or use one that already exists.
  9. Optional: Enter the attribute name space using a Dictionary-type variable
    Create a new Dictionary-type variable or use one that already exists.
  10. Click Save.