I am using JDK8 streams in my project .
From the third party application i am going to get the soap xml response mentioned below . According to requirement i have to capture the MetaDataItem which contains the ExecutionCode and the corresponding Value .
<Response>
<ProcessingResults>
<Identifier>identifier-A</Identifier>
<StepResult>
<Identifier>device</Identifier>
<DataItem>
<Identifier>key</Identifier>
<MetaData>
<MetaDataItem>
<Name>ExecutionCode</Name>
<Value>0</Value>
</MetaDataItem>
</MetaData>
</DataItem>
</StepResult>
</ProcessingResults>
</Response>
I am not sure how can i traverse the object till MetaDataItem using JDK8 Streams. I tried but no luck for me
In my JAXB classes
1. Response class contains "List<ProcessingResults>".
2. Each ProcessingResult class contains the "List<StepResults>".
3. StepResult class contains the "List<DataIteam>".
4. DataItem class contains the "List<MetaDataItem>".