Delete element Version 4 (Net)

Action group: XML


Description

Deletes an element from an open context

Action icon


Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
XML contextXML-контекстRobin.XMLXML contextYes
XPathPath to XML-element in DOM modelRobin.String
Yes

Special conditions of use

None.

Example of use

Task

There is an XML document Text.xml, it is necessary to remove the PRICE attribute from the BOOK element. Save a copy of the modified XML file to the desktop. 

Solution

Use the actions "Load XML", "Delete element", "Save to file". 

Example of use

  1. Assemble a robot scheme consisting of actions:

  2. Set the "Load XML" action parameter.

  3. Set the parameters of the "Delete element" action. 

  4. Set the parameters of the "Save to file" action. 

  5. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully. The required PRICE attribute has been deleted.

The required PRICE attribute has been removed from the XML document Copy of the file with change.xml

  • Нет меток