Connect to an XML file (Power Query)
Important This article applies to Power Query, a data analysis feature available for Excel that lets you discover, combine and refine data. You may need to enable Power Query in Excel. You can also download and install the most recent version of Power Query for Excel, which automatically enables it. Power Query technology is also built into the Power BI Designer, which is a stand-alone report authoring and data transformation tool for Power BI.
In the POWER QUERY ribbon tab, click From File > From XML.
In the From XML Browse dialog box, browse for or type a file URL to import or link to a file.
After the connection succeeds, you will be able to use the Navigator pane to browse and preview the collections of items in the XML file in a tabular form.
You can use the Query Editor to write formulas for Power Query.
= Xml.Tables(File.Contents("C:\Downloads\XML Example.xml"))
Note The Query Editor only appears when you load, edit, or create a new query using Power Query. The following video shows the Query Editor window appearing after editing a query from an Excel workbook. To view the Query Editor without loading or editing an existing workbook query, from the Get External Data section in the Power Query ribbon tab, select From Other Sources > Blank Query. The following video shows one way to display the Query Editor.