AnsweredAssumed Answered

How to get max value of an xml element?

Question asked by hgadige@osius.com on Jun 13, 2017
Latest reply on Jun 13, 2017 by Adam Arrowsmith

Hi All,

I have an xml profile with the following data.

<Process>
<ExecutionRecord>
<executionId>execution-c02b3a09-c611-46cf-bacb-c223cc55927b-2017.06.03</executionId>
<account>chartercommunications-CDCON6</account>
<executionTime>20170603 153000.000</executionTime>
<status>COMPLETE</status>
<executionType>exec_sched</executionType>
<processName>INT-543 AdvertiserSync Sch_Process</processName>
<processId>37ac59f3-175b-4ee2-8da7-0764019cc1cc</processId>
<atomName>STL_DEV_01</atomName>
<atomId>fa179ef9-a2f3-4c71-8498-b6a4cc8a1c94</atomId>
<inboundDocumentCount>1</inboundDocumentCount>
<inboundErrorDocumentCount>0</inboundErrorDocumentCount>
<outboundDocumentCount>164</outboundDocumentCount>
<executionDuration>17489</executionDuration>
<inboundDocumentSize>0</inboundDocumentSize>
<outboundDocumentSize>24793</outboundDocumentSize>
<counter>1</counter>
</ExecutionRecord>
<ExecutionRecord>
<executionId>execution-3f189845-3ddd-435a-89e3-45cf5c74e972-2017.06.03</executionId>
<account>chartercommunications-CDCON6</account>
<executionTime>20170603 154500.000</executionTime>
<status>COMPLETE</status>
<executionType>exec_sched</executionType>
<processName>INT-543 AdvertiserSync Sch_Process</processName>
<processId>37ac59f3-175b-4ee2-8da7-0764019cc1cc</processId>
<atomName>STL_DEV_01</atomName>
<atomId>fa179ef9-a2f3-4c71-8498-b6a4cc8a1c94</atomId>
<inboundDocumentCount>1</inboundDocumentCount>
<inboundErrorDocumentCount>0</inboundErrorDocumentCount>
<outboundDocumentCount>1</outboundDocumentCount>
<executionDuration>653</executionDuration>
<inboundDocumentSize>0</inboundDocumentSize>
<outboundDocumentSize>304</outboundDocumentSize>
<counter>2</counter>
</ExecutionRecord>
<ExecutionRecord>
<executionId>execution-c9064d9b-b1c1-4e16-9631-321a76895252-2017.06.03</executionId>
<account>chartercommunications-CDCON6</account>
<executionTime>20170603 160000.000</executionTime>
<status>COMPLETE</status>
<executionType>exec_sched</executionType>
<processName>INT-543 AdvertiserSync Sch_Process</processName>
<processId>37ac59f3-175b-4ee2-8da7-0764019cc1cc</processId>
<atomName>STL_DEV_01</atomName>
<atomId>fa179ef9-a2f3-4c71-8498-b6a4cc8a1c94</atomId>
<inboundDocumentCount>1</inboundDocumentCount>
<inboundErrorDocumentCount>0</inboundErrorDocumentCount>
<outboundDocumentCount>185</outboundDocumentCount>
<executionDuration>16019</executionDuration>
<inboundDocumentSize>0</inboundDocumentSize>
<outboundDocumentSize>27713</outboundDocumentSize>
<counter>3</counter>
</ExecutionRecord>
</Process>

 

I need to get the maximum value of "counter" element.

Please provide a solution.

Outcomes