How to query XMLs with namespaces as dynamic columns in Azure Data Explorer (Kusto)

This post has been republished via RSS; it originally appeared at: Azure Data Explorer articles.

XML parse into dynamic column can be done with parse_xml(x). 

Here is a workaround to enable translation of XMLs with namespaces.

 

datatable (dumpInput:string)
    ['<SOAP-ENV:Envelope xmlns:e="http://www.test.com"></SOAP-ENV:Envelope>']   
| extend x = replace("<(.+?):", @"<\1", dumpInput)
| project s=parse_xml(x)
| extend s["SOAP-ENVEnvelope"]["@xmlns:e"]

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.