# Extract data from XML log

**URL:** <https://community.dynatrace.com/t/extract-data-from-xml-log/53417>\
**Category:** Logs\
**Tags:** logs\
**Created:** [September 18, 2025, 5:31pm UTC](https://community.dynatrace.com/t/extract-data-from-xml-log/53417 "2025-09-18T17:31:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marusla](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marusla/32/24217_2.png) [@marusla](https://community.dynatrace.com/u/marusla)\
**Post date:** [September 18, 2025, 5:31pm UTC](https://community.dynatrace.com/t/extract-data-from-xml-log/53417/1 "2025-09-18T17:31:01Z")

</div>

I have an XML log that have a some line that starts with error. I want a extract that data, I don’t know how to do it? i think maybe extract each in different columns but if some log have 2 and other 5 error line?

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [September 18, 2025, 7:35pm UTC](https://community.dynatrace.com/t/extract-data-from-xml-log/53417/2 "2025-09-18T19:35:12Z")

</div>

I believe the best option would be to parse the XML and then extracting the data you need for filtering.

> **[DPL XML Documents](https://docs.dynatrace.com/docs/platform/grail/dynatrace-pattern-language/dpl-xml)**
>
> Find out how to use XML matchers with DPL.

Could you provide some dummy example of the data so we can provide you some DQL example?

---

<div class="post-metadata">

**Author:** ![marusla](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marusla/32/24217_2.png) [@marusla](https://community.dynatrace.com/u/marusla)\
**Post date:** [September 18, 2025, 7:54pm UTC](https://community.dynatrace.com/t/extract-data-from-xml-log/53417/3 "2025-09-18T19:54:33Z")

</div>

this is the data, i want to capture all the data that start with&nbsp;Error.Mensaje.Web

en System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage()  
en System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke()  
en Error.Mensaje.Web.InformacionService.IInformacionService.Consulta(String mid)  
en Error.Mensaje.Web.Code.General.Comercio.compra en C:\Github\Code\General\ComercioCode.cs:línea 2561  
en Error.Mensaje.Web.Controllers.General.InformacionController.ConsultarInformacionComercio(String mid) en Github\Code\General\ComercioCode.cs:línea 125

---

<div class="post-metadata">

**Author:** ![marusla](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marusla/32/24217_2.png) [@marusla](https://community.dynatrace.com/u/marusla)\
**Post date:** [September 18, 2025, 9:31pm UTC](https://community.dynatrace.com/t/extract-data-from-xml-log/53417/4 "2025-09-18T21:31:30Z")

</div>

sorry its a&nbsp;&nbsp;stack trace records

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [September 19, 2025, 7:51pm UTC](https://community.dynatrace.com/t/extract-data-from-xml-log/53417/5 "2025-09-19T19:51:45Z")

</div>

Could you paste the full content from one line of your current dql query? This does not look like a XML.

We will need to take a look at the full content in order to suggest a DQL you can try.
