Counter Variable in XPath name?

Last update: 2022-11-08

Description

Environment

  • Campaign Classic
  • Campaign
  • Campaign Standard

Is it possible to use a counter variable like the one given below in an xpath name?

set expr=”@counter” xpath=”/test/element@counter”


Trying this shows an error with the @counter in the bracket in the xpath, but using a number instead set expr=”@counter” xpath=”/test/element1” works just fine.

Is there a function for adding to a DOMDocument Element, either by an append function or by using the above mentioned counter variables?

Resolution

xpathExpr will work.

On this page