Skip to content

Instantly share code, notes, and snippets.

@Hugoberry

Hugoberry/dummy2XML.m

Last active Apr 11, 2017
Embed
What would you like to do?
Dummy table serialized as XML binary
let
//Transform each row of [dummy] table into a binary XML
rows = Table.TransformRows(dummy,
each Binary.Combine({Text.ToBinary("<row><key>")
,Text.ToBinary(Text.From([key]))
,Text.ToBinary("</key><value>")
,Text.ToBinary([value])
,Text.ToBinary("</value></row>")})),
//Wrapping up all the rows in <table> tags
out = Binary.Combine({Text.ToBinary("<table>")}&
rows&
{Text.ToBinary("</table>")})
in
out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.