AnsweredAssumed Answered

How to split an XML and process each node?

Question asked by stephan.burkard on Aug 10, 2016
Latest reply on Aug 11, 2016 by orrde01


Hi

I am receiving XML files containing multiple "documents". I want to split the whole XML into documents and then process each document.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Export>
    <Header></Header>
    <Documents>
        <Document>...</Document>
        <Document>...</Document>
        <Document>...</Document>
        <Document>...</Document>
        <Document>...</Document>
    </Documents>
</Export>

 

When I understand the documentation of the the "Run Assertions for Each Item Assertion" correct, I can run into problems when I use it:

If any of the POST requests fail to reach the target server, the Run Assertions for Each Item assertion will fail and the remaining POSTS will not be attempted.

I understand this as: the iteration can break after 2 documents. What happens then to the rest of the documents? How can I process them since the iteration will always break at the same point no matter how often I retry?

 

What I am looking for is way to process EACH document, no matter if one or some documents are not processable. If a processing error occurs, I would like to define an "exception handling" for the erroneous document. But the iteration must continue. 

 

Thanks for any hints

Stephan

Outcomes