AnsweredAssumed Answered

Combine documents

Question asked by rob.banas on Jun 27, 2017
Latest reply on Aug 22, 2017 by rob.banas

Hi, I'm looking for a way to combine a number of documents into 1.

I have 3 XML documents:

 

1) 

<author>
<fname>Bob</fname>
<lname>Smith</lname>
<titles>
<title>one</title>
<title>two</title>
<title>three</title>
</titles>
</author>

 

2)

<author>
<fname>Bob</fname>
<lname>Smith</lname>
<titles>
<title>four</title>
<title>five</title>
<title>six</title>
</titles>
</author>

 

3)

<author>
<fname>Bob</fname>
<lname>Smith</lname>
<titles>
<title>seven</title>
<title>eight</title>
<title>nine</title>
</titles>
</author>

 

I'd like them to be combined into:

<author>
<fname>Bob</fname>
<lname>Smith</lname>
<titles>
<title>one</title>
<title>two</title>
<title>three</title>
<title>four</title>
<title>five</title>
<title>six</title>
<title>seven</title>
<title>eight</title>
<title>nine</title>
</titles>
</author>

 

In my profile, <titles> looks like:

 

and <title> looks like:

 

 

Combining on <title> produces:

 

<?xml version='1.0' encoding='UTF-8'?>

<author>
<titles>
<title>one</title>
<title>two</title>
<title>three</title>
<title>four</title>
<title>five</title>
<title>six</title>
<title>seven</title>
<title>eight</title>
<title>nine</title>
</titles>

</author>

 

Where my author's fname and lname nodes are missing.

 

My process looks like:

 

Can anyone suggest what I'm missing?

Outcomes