Back Forward Home Print
Nintex Workflow 2013 > Workflow Actions
Update XML

The Update XML action is used to alter XML data. It can be used to alter an XML file that the workflow is running on, including InfoPath forms.

To use the workflow action:

  • Locate the action in Workflow Actions Toolbox (located on the left hand-side);
    • Click on the Category listings to reveal the actions; OR
    • Search for the action using a keyword.
  • Select the action, drag it onto the design canvas and drop it onto a design pearl.

Alternatively

  • Left-clicking the pearl, mouse-over Insert Action and then the Categories to reveal the actions, click the required action from the list.

To change the settings used by the action:

  • On the action’s title click the down arrow to activate a drop-down
  • Select Configure; OR
  • Double-click the action's icon.

For more information on the other options in the drop-down, please refer to the Getting started with the Nintex Workflow designer.

Action Settings

XML source

Specify the location of the XML to alter. A copy of this XML data is processed by the workflow action. Select one of the following options:

  • Current item: The item that the workflow is running on will be used as the source. This option is available for workflows designed on libraries only.
  • URL: Data located at a nominated URL will be used as the source. A username and password can be provided for the request. If no username or password is provided, the request will be anonymous.
  • XML: Specify text or inserted references as the XML source.

Updates

A number of update operations can be performed by a single Update XML action.

XPath query

The XPath query to the XML nodes that will be altered. The XPath query can resolve to a single node, or a node list. If the result is a node list, the selected change will be applied to each node. Click on the XPath Builder button to use the XML browser to navigate the XML structure and select an element from the XML data.

Note: If the XML source specified for the action is available and all tokens and references are replaced with actual run time values, then the XPath Builder will use the XML source to display the XML structure within the XML browser. Otherwise, sample XML data will need to be provided in order to select the node using the XML browser.  

Selected node(s) action

The operation to perform on the selected node. Select one of the following options:

  • Replace node contents: Replace all content within the XML node with the supplied value. 
  • Add child node: Adds a new node from the supplied XML fragment.
  • Set node text: Sets the value of the XML node to the supplied text.

 

Add XML update: Select to define another update operation.

Store result in

Specifies where the resulting XML should be stored. Select Workflow variables type or choose from the following options:

  • Current item: The contents of the item on which the workflow is running will be overwritten with the new XML. Use this to update InfoPath form items. This option is available for libraries only.
  • URL: The XML will be stored at a location specified by a URL. The URL does not have to point to a SharePoint location.

Troubleshooting

Action not executing

The work load for this action is added to a job queue. The workflow executes jobs in the queue as a batch when it reaches a "commit" point. For more information, see the Nintex article "Commit Pending Changes in Workflow Design."