How do I work with XPath Actions?

Document ID : KB000048403
Last Modified Date : 14/02/2018
Show Technical Document Details

XPath is a query language for retrieving and updating content of an XML document.

Below few examples of common XPath actions usage

  1. Extract value of attribute
    Action to use: Execute an XPath query
    Example1: Finding RepositoryRootPath value

    Figure 1

    Nolio action will have the following inputs

    Figure 2

    Example 2: Finding Date value

    Figure 3

    Nolio action will have the following inputs

    Figure 4

  2. Update an XML attribute

    Action to use: Update an XML attribute using XPath

    In this example we will update the "RepositoryRootPath" value

    Figure 5

    Nolio action will have the following inputs

    Figure 6

    After running the XPath action the XML file will be updated as follow

    Figure 7

  3. Insert an XML attribute

    Action to use: Insert an XML element using XPath

    In this example we will add new Location element:

    Figure 8

    Nolio action will have the following inputs

    Figure 9

    After running the XPath action the XML file will be updated as follow:

    Figure 10