I’m trying to read every SellersItemIdentification from each InvoiceLine. I made a for each loop based on the example found on https://www.uipath.com/kb-articles/how-to-iterate-and-read-xml-documents.
But it doesn’t work with the XML we receive because the “:” can’t be used in the name.
I already found some info about using XNamespace but i can’t get it to work.
How do I get this to work?
This will pass a number of system.xml.linq.XElement variables to your for each loop and doing it one by one ensures easy troubleshooting.
Within elements you will have attributes and these attributes have values in quotation marks. if you are trying to access these values directly then it will be something like this passed into the for each:
You may find a site like this useful to provide your XML tree structure in a more easily understood format for this task: https://codebeautify.org/xmlviewer