I’m not completely sure how to use decendants or the childs, so the post doesn’t quite help me in the way I would like.
The first < DTorderkort> doesn’t contain < Sales_Documents>, so I would like to skip those elements, and only do my three assign and the for each run through of the Sales docments on the second < DTorderkort>
the info on the first < DTorderkort> can be different to the second, so if Sales documents is empty look for the next.
@Michaeljep
However you have to pay attention to the namespace definition
you would fetch the < DTorderkort> with descendants, then you can proces e.g. filtering the no containing saledDocuments, .etc…
we can help you on this faster with an uploaded sample XML.
I dug a bit deeper and managed to achieve it by doing a “For each” on the < DTorderkort> containing a for each on the Sales Documents, this gives me the last occurrence of the DT order that contains sales documents.