Basic XML File Read

Hi Community,

I am hoping for a bit of help. I have built a very simple sequence that reads in the attached XML file. However I am having real difficulties getting out the “orig-account-number” value.

I have attached my simple sequence also for reference. So far the best I can do is return the entire line.

It is also important to note that whilst the sample XML file I have attached has only one ‘MessagingAdvice’ in it, the real file has multiple instances in it.

What I need is to be able to read out the attribute for every line of ‘MessagingAdvice’

Your help/advice would be appreciated

XMLRead.xaml (8.0 KB)

Test.XML (1.5 KB)

Hi @Gerard_McNamara_Ged

You were not looping through the xml nodes. In your workflow, you need to first check is the element exists before accessing it. Then loop through the records to reach the last child node and retrieve the attribute value.

I have updated your workflow as well XMLRead.xaml (10.2 KB)

Hope this resolves your problem.
If this helps, please mark it as solution so that people facing similar issues can directly navigated to answer.

Thankyou for your help on this. I have stepped through your updates and now have an understanding of how it is working along with the test to make sure the element exists

:+1:

1 Like

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