With this I can map the field into elastic as the same index but the problem is how do I do it first in logstash. I explored XML filter xpath and split filter but both does not work? Any help would be much appreciated.
Multiline codec on your input along with the XML filter's xpath functions will get you what you want. The Elastic Stack sees related data as an Event. Delineation between different events is done per line. In your example, Logstash thinks you just fed it 20 events. To fix this, use the Multiline codec to cram everything onto a single line. In your XML Filter, use xpath to define what to label the field as and what the data in the field is. For example:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.