I am looping through many xmls with the same structure but different number of rows. I need to extract number from such line.
<v:sampleDataSet dataSetName="990">
I have many identical lines (apart from the number) in each xml but I need to extract only the last one.
I only managed to save entire xml to a variable separated to lines with the action "read text from file".
I can set a variable from any line of this xml by using set variable action and referencing the the line number, but I don't know how to make reference to a variable line number - cause I repeat this operation for many files with different line count.
1. Input the text into variable1 ( I test <v:sample 110 DataSet 125 dataSet125Name="990.01">)
2. Recognize the entities by number for Variable1
in this sample it will have 2 same columns 3 rows with number 110, 125, 990.01
3. Launch a new excel and write it into A1
4. Get the first freerow of the excelinstance
5. ConditionLoop FirstFreeRow > 1
6. DeleteRow from excel, 1st row
7. Get FirstFreeRow again
8. Decrease Variable by 1
9. EndLoop
10.Read A1 from Excel
11.Close Excel without save
Then you could set a bigger loop to include those steps
Deleted
Benny, thank you for this description. Although, I am afraid I didn't provide enough details. My xml has many different lines, and only some of them look like that. See the screenshot for reference.
I want to look for the last <v:sampleDataSet dataSetName=
in this case I need to extract: 935 to a variable.
Benny, thank you for this description. Although, I am afraid I didn't provide enough details. My xml has many different lines, and only some of them look like that. See the screenshot for reference.
I want to look for the last <v:sampleDataSet dataSetName=
in this case I need to extract: 935 to a variable.
I am afraid I can't loop in such a way - I already have a loop for each file.
My flow will go through many xmls each time saving each of them into one variable that will be used to other processes.
Sorry - it's hard to explain without looking into the specific flow.
I achieved my aim with a different method, by processing values within Excel and getting them from it. Appreciate your help though.
Congratulations!
Yes, read all file path at same time and copy into excel to use formular or PQ to delimiter is a good solution but hard to explain. IOI
First, read the XML from the file into a variable.
After you parse text with this variable it will give you all the positions of the specific text in the XML.
Then for each loop to go through the XML to get subtext and save it if you need it. %CurrentItem+30% give you the location of the number so you need to read 3 characters.
Hope the content above may help you.
Best Regards
If my answer helps, then please consider Accept it as the solution to help the other members find it more quickly.