The Create XML Node action is used to create a new node in an XML document. You enter an XPath expression to specify the location of the node. Attributes for the node can also be specified if desired.
(Node and attribute names must be alphanumeric, begin with a letter, and contain no spaces.)
From the Task Builder Available Actions pane, open the XML folder and double-click the Create XML Node action or drag it into the Steps pane.
In the File box, click the Open Folder button , navigate to the desired document, and click Open.
In the XPath expression box, enter the expression to specify the location of the node.
In the Name box, enter a name for the node.
In the Value box, enter the value for the node (if any).
In the If node already exists box, select Ignore, Skip, Overwrite, or Fail.
To make the added node the first child node, select Insert as first child node. If this is not selected and other child nodes exist at the location, the new node will be appended after the existing ones.
If you want to enter attributes, click the Attributes tab, and enter attributes as follows:
In the boxes at the bottom of the window, enter an attribute name and value. You can click the Insert Expression/Variable button and use the Expression Builder to enter an expression in either box.
The entered name and value are added to the list.
To enter additional attributes repeat the process above.
To modify an attribute, select it on the list, enter the new name and value in the boxes, and click Modify.
To delete an attribute, select it on the list and click Remove.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Create XML Node Action