Hi there,
I am using the ‘Get XML Elements’ task with an xPath similar to this: //element1////@[. = ‘value1’] to retrieve a list of all the attributes that are set to =“value1” in an XML doc. I’m saving that with the output name ‘emptyAttributes’ and when I print ‘emptyAttributes’ to the console I see all the correct matches. However I am having trouble working out how to then loop through that emptyAttributes set and then do a further function on it (e.g. delete that attribute, or update the value to =“foobar” or something).
While looping through the set, I’m setting ‘Current Item Name’ as ‘attribute’ in the loop, then in the Set XML Value operation setting the ‘Node’ to “=attribute” but I have no idea what to enter for the XPath as I don’t know the exact XPath (having got the set emptyAttributes from the Get XML elements operation it could be anything…).
Do I need to do =“attribute.getPath()” or something for the XPath value?
Thanks