# Unescape XML

**URL:** <https://discuss.elastic.co/t/unescape-xml/248548>\
**Category:** Elasticsearch\
**Tags:** painless\
**Created:** [September 14, 2020, 3:06pm UTC](https://discuss.elastic.co/t/unescape-xml/248548 "2020-09-14T15:06:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BkQc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkqc/32/73699_2.png) [@BkQc](https://discuss.elastic.co/u/BkQc)\
**Post date:** [September 14, 2020, 3:06pm UTC](https://discuss.elastic.co/t/unescape-xml/248548/1 "2020-09-14T15:06:28Z")

</div>

I have a field which contains data that came from an XML node.  
For some reason, this XML was not unescaped so I end up with values like `&#xD;&#xA;` instead of a line feed (CrLf). Is there any way of unescaping this in an ingest painless script processor?

(I assumed there was no actual processor that could do that)

---

<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:** [October 12, 2020, 3:06pm UTC](https://discuss.elastic.co/t/unescape-xml/248548/2 "2020-10-12T15:06:37Z")

</div>

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