Will match //FOO.Configuration[0]/directories but will not match //FOO.Configuration[1,2,...]/directories
This is not XPath behavior. The proper XPath behavior would be to iterate over the NodeList that matches the XPath and to do the operation defined on all members of the NodeList. The documentation describes XMLConfig@ElementPath as an XPath, so it should behave accordingly.
Per the v3.6 documentation for XMLConfig/@ElementPath:
The XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.
Will match //FOO.Configuration[0]/directories but will not match //FOO.Configuration[1,2,...]/directories
This is not XPath behavior. The proper XPath behavior would be to iterate over the NodeList that matches the XPath and to do the operation defined on all members of the NodeList. The documentation describes XMLConfig@ElementPath as an XPath, so it should behave accordingly.
Per the v3.6 documentation for XMLConfig/@ElementPath: The XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.