I have what I feel is a fairly straight forward question and I am a bit frustradted that I can not figure it out myself.
I have an XML file.
Looks like this (in i.e. c:\temp\file.xml):
< ?xml version=“1.0” encoding=“ISO-8859-1”?>
< Main>
< Product>
< ProductID itemNumber=“99999”>
< SubProduct numberOfInstances=“1” unitType=“Each”>
< ProductID itemNumber=“10000”>
< Amount value=“123” UOM=“mg”/>
< /ProductID>
< /SubProduct>
< /Product>
< /MainDeclaration>
The itemNumber will occurr a many times and I want to replace the original value with a running number (1, 2, 3 …).
I basically want to do a find / replace, but with a counter. Maybe UiPath is overkill, but there can be other use cases later so figured it would be nice to have
Basically I can read the xml, find the attribute, bu I can not replace it in the original file.
Please help me
TestXML.xaml (8.4 KB)
Attached the XAML as samle