Xml.Tables
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns the contents of an XML document as a nested collection of flattened tables.
Xml.Tables(contents as any, optional options as nullable record, optional encoding as nullable number) as table
| Argument | Description |
|---|---|
| Contents | The contents may be directly passed to the function as text, or it may be the binary value returned by a function like File.Contents or Web.Contents. |
| optional options | Control the behavior of this function. |
| encoding | Encoding value. |
| Setting | Description |
|---|---|
| NavigationTable | If true, output tables are navigation tables. Default value is true. |
Xml.Tables("<books>
<book>
<name>Book1</name>
</book>
<book>
<name>Book2</name>
</book>
</books>")
equals
(Table.FromRecords({ [
Name = "book",
Table = (Table.FromRecords({ [
name = "Book1"
], [
name = "Book2"
]
)
Show: