I want to use the InsertIfMissing
function with a locator of the node's text()
.
I tried the following:
<SessionItem xdt:Transform="InsertIfMissing" xdt:Locator="Match(text())">new_item</SessionItem>
But it looks like the xdt doesn't recognize the text()
function.
How can I make it work?
Possible with xdt:Locator="Condition(boolean(XPATH EXPERSSION)"
.
For example,
<SessionItem xdt:Transform="InsertIfMissing" xdt:Locator="Condition(boolean(//SessionItem[text()="new_item"]))">new_item</SessionItem>