Page tree
Skip to end of metadata
Go to start of metadata

This is the most complex XML node. Among the parameters, one part are fixed and the other are variable. The fixed part has to do with selecting what needs to be modified. N.B.: Using this node requires the XML Firewall license option.

Parameters

  • Display name: The name of the node as it will appear in the Workflow. Replaces the term “XML Modify”.
  • XML Document: the XML attribute to modify
  • XPath Expression: Selects the XML nodes to be modified.
  • Namespace Profile: Selects the XPath profiles to be used.
  • Action to do: action to be performed for the selected nodes (Add 'Information' [defined later], Modify or Delete elements)

Action to do "Add"

The Add action automatically selects Element-type nodes, at the level of the XPath (attribute and text-type nodes will simply be ignored).

It is possible to add a variety of 'Information’ to a node.

The “What to add” field is for choosing what is to be added:

Content and/or Attributes

You can add attributes to the nodes (“Add Attributes” field). These attributes are selected via a table whose key corresponds to the name of the attribute and whose value corresponds to the value of the attribute. This field can remain empty, in which case the attributes of the node will not be changed.

It is also possible to add content (“Add Content” field). This content will be added to text-type nodes. This field is optional and can remain empty.

New Node

It is possible to add a new node to the nodes selected by the XPath. This node can be added before, after, or as a child of the node selected by the XPath.

The “New node name” field lets you define its name; it can be assigned a namespace, attributes, and content.

Import from a Workflow XML Attribute

Nodes that exist in another XML document can be added. To do that, choose the “workflow xml” attribute that contains the nodes you want to insert, then via XPath (xpath + profile), select the nodes to be inserted.

Import from a text xml

If the nodes to be inserted don't appear in any existing XML document, they can be written “by hand” as parameters of the node. It will then be parsed, then inserted. If you want to insert several nodes one after the other, the XML does need to contain a root node. The “skip root” option lets you insert only all the elements below the root (but not the root itself).

Modify Action

The Modify action lets you modify the nodes selected by the XPath. When you want to modify nodes, you have to specify what type of node you want to work on.

The “Node type filter” field lets you select only “Element,” “Attribute,” or “Text”-type nodes.

For “Element” nodes, it is possible - as for Adding – to import from an XML attribute (“Import from XML Attribute”) or a text XML parsed on the fly (“Import from a text xml”). When importing, it's no problem for each node selected to be replaced by several nodes. A final possibility: “Simple replace” lets you modify the name of a node, its namespace (currently it's impossible to give it a namespace if it already has one), its attributes, and its content. When its attributes are modified, the “Full Replace” option lets you choose whether to first completely delete the existing attributes before applying the new attributes (non-existent attributes are added).

For “Attribute”-type nodes, the name and the value of the attribute can be modified.

For “Content” nodes, the content can be modified.

Delete Action

The Delete action deletes selected nodes. Here, there is no restriction on the nodes. They can be “Element”, “Content”, or “Attribute” nodes.