# Logstash XML parsing issues - trying to send to Graylog, part 2

**URL:** <https://discuss.elastic.co/t/logstash-xml-parsing-issues-trying-to-send-to-graylog-part-2/193209>\
**Category:** Logstash\
**Created:** [July 31, 2019, 7:26pm UTC](https://discuss.elastic.co/t/logstash-xml-parsing-issues-trying-to-send-to-graylog-part-2/193209 "2019-07-31T19:26:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![eclipsed450](https://avatars.discourse-cdn.com/v4/letter/e/b5e925/32.png) [@eclipsed450](https://discuss.elastic.co/u/eclipsed450)\
**Post date:** [July 31, 2019, 8:14pm UTC](https://discuss.elastic.co/t/logstash-xml-parsing-issues-trying-to-send-to-graylog-part-2/193209/3 "2019-07-31T20:14:24Z")

</div>

@Badger so, swap out the `if/else` statements for the following?

```auto
	ruby {
	    code => '
	      event.get("[xml_content]").each { |a|
	        name = a["Name"]
	        value = a["Content"]
	        event.set( "[xml_content]#{name}", value)
	      }
	    '
  	}

```

I tried it, and got the following:

```auto
...
[ERROR] 2019-07-31 13:09:12.013 [[main]>worker1] ruby - Ruby exception occurred: no implicit conversion of String into Integer
[ERROR] 2019-07-31 13:09:12.013 [[main]>worker1] ruby - Ruby exception occurred: no implicit conversion of String into Integer
[ERROR] 2019-07-31 13:09:12.013 [[main]>worker1] ruby - Ruby exception occurred: no implicit conversion of String into Integer
[ERROR] 2019-07-31 13:09:12.014 [[main]>worker1] ruby - Ruby exception occurred: no implicit conversion of String into Integer
...

```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-xml-parsing-issues-trying-to-send-to-graylog-part-2/193209)._
