How to extract every xml on a folder that starts with a certain prefix?

I have a folder with many xml, and I’m trying to extract each and every xml that starts with “format_example_”.
Also on another note, how do I put every node of the xml on a collection or a table to do later process. I have tried doing it with one xml only using read text file, deserialize XML and a for each cycle with the expression xml.Descendants(“elementsIwant”), but the item inside the cycle is not recognized as an XElement and gives an Option strict on disallows late binding; even though that if use the item.getType function it gives me that it is in fact an XElement.

use Assign activity → Directory.GetFiles(“DirectoryPath”,“format_example_*”)
Will return the array of files starting with format_example_
Use For each activity to loop through the files.

How to read and traverse the elements of xml you can look at the following article -

Karthik Byggari

1 Like

Thanks for your reply, It was exactly what I was looking for, but for the second question though I have already done that, but it’s not working.

You can see that it doesnt recognize it as an XElement, and If I write the method anyways It says the following

What is strange is that if I write item.getType.toString in the message box it prints that it is in fact an XElement

This doesn’t make any sense to me.