# Pasrse data between repeated xml tags

**URL:** https://discuss.elastic.co/t/pasrse-data-between-repeated-xml-tags/172270
**Category:** Logstash
**Created:** [March 14, 2019, 7:49am UTC](https://discuss.elastic.co/t/pasrse-data-between-repeated-xml-tags/172270 "2019-03-14T07:49:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [March 14, 2019, 2:02pm UTC](https://discuss.elastic.co/t/pasrse-data-between-repeated-xml-tags/172270/2 "2019-03-14T14:02:04Z")

</div>

> [@sverma](#):
>
> codec =\> multiline {  
> pattern =\> "^\</job\_list\>"  
> negate =\> "true"  
> what =\> "previous"  
> }

This will not result in valid XML. I suggest you consume the entire file as a single event using a multiline codec with a pattern that never matches. For example

```
codec => multiline { pattern => "^Spalanzani" what => "previous" negate => true auto_flush_interval => 2 }

```

You will then be able to parse elements from /job\_info/job\_list or /queue\_info/job\_list.

---

_[View the full topic](https://discuss.elastic.co/t/pasrse-data-between-repeated-xml-tags/172270)._
