AnsweredAssumed Answered

Merge multiple documents to one (XML's)

Question asked by 40592737 on May 12, 2016
Latest reply on Apr 3, 2018 by leif.jacobsen@dagrofa.dk


Is it possible to merge multiple XML documents into one ?

 

E.g

Document 1:

****************

<user>

<id>1</id>

<startdate>01-01-2016</startdate>

<currentvalue>1</currentvalue>

</user>

Document 2:

****************

<user>

<id>1</id>

<startdate>01-01-2015</startdate>

<currentvalue>5</currentvalue>

</user>

 

Document 3:

****************

<user>

<id>1</id>

<startdate>01-01-2014</startdate>

<currentvalue>15</currentvalue>

</user>

 

Output expected: (combine latest 2 records into one with current & previous values)

********************

<user>

<id>1</id>

<currentvalue>1</currentvalue>

<previousvalue>5</previousvalue>

</user>

 

Any ideas appreciated.

 

GBK

Outcomes