# Concat the XML array in logstash

**URL:** <https://discuss.elastic.co/t/concat-the-xml-array-in-logstash/69241>\
**Category:** Logstash\
**Created:** [December 16, 2016, 6:05am UTC](https://discuss.elastic.co/t/concat-the-xml-array-in-logstash/69241 "2016-12-16T06:05:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [December 16, 2016, 6:05am UTC](https://discuss.elastic.co/t/concat-the-xml-array-in-logstash/69241/1 "2016-12-16T06:05:52Z")

</div>

HI Team,  
I'm just working on new type of XML file. I have some array information in that file i want to gather all those data.. This array fields are repeating with same tags due to this while processing the log the i'm getting empty array value and help me to concat all the value and store in a field. Please find the sample code for your refrerence,

\<\_5:TelephoneCommunication\>  
\<\_5:ChannelCode\>Day\</\_5:ChannelCode\>  
\<\_5:CompleteNumber\>312\</\_5:CompleteNumber\>  
\<\_5:UseCode\>Day\</\_5:UseCode\>  
\</\_5:TelephoneCommunication\>  
\<\_5:TelephoneCommunication\>  
\<\_5:ChannelCode\>Evening\</\_5:ChannelCode\>  
\<\_5:CompleteNumber\>123\</\_5:CompleteNumber\>  
\<\_5:UseCode\>Evening\</\_5:UseCode\>  
\</\_5:TelephoneCommunication\>  
\<\_5:TelephoneCommunication\>  
\<\_5:ChannelCode\>Cell\</\_5:ChannelCode\>  
\<\_5:CompleteNumber\>231\</\_5:CompleteNumber\>  
\<\_5:UseCode\>Cell\</\_5:UseCode\>  
\</\_5:TelephoneCommunication\>

xml code to extract the info,

"//body/ProcessMessageResponse/payload/content/ConfirmBOD/ConfirmBODDataArea/RepairOrder/RepairOrderHeader/OwnerParty/SpecifiedPerson/TelephoneCommunication/ChannelCode/text()","user\_call\_mode",

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 13, 2017, 6:06am UTC](https://discuss.elastic.co/t/concat-the-xml-array-in-logstash/69241/2 "2017-01-13T06:06:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
