Extracting data from different xml structures

Hello!
There are two types of xml files with different data structures. How can I make the program extract data from two files? I’m thinking of using an if condition that will compare the namespaces from the DataTable. For example, if the namespace in the xml file is def, then execute one sequence, otherwise another. So it will write both files. What condition should be prescribed?
XPath.zip (44.3 KB)

@sereganator
I will have a look on it. give me some little time. Thanks

@sereganator
as already mentioned in one of your other topics, switching based on the root local name can do it:

Sure the xaml requires some more work, but will achieve it by yourself.

I would suggest also following:

  • Check out in the Academy the Course Debugging
  • use log message instead of Write line or Message Box. But do logging if message is really helping. Inspecting the Values / Result Correctness is done with debugging / Breakpoints etc. (thats why I was recommended the course, here you will learn)

Also check out for the Excel writing and take a note on how common things were moved to get executed only 1 time instead within each loop

Find starter help here:
MainV2.xaml (28.2 KB)

Happy Automation :+1

1 Like

Thank you so much, very helpful. Using cases is very convenient, since you can simply add new scripts.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.