Convert from Elixir code to XML

Is it possible to convert a file made up of Elixir code into an XML file, or better into a pretty printed Abstract Syntax Tree ?

Maybe this way:

pretty_printed_ast =!(path_to_file) |> Code.string_to_quoted!() |> inspect(pretty: true)

In theory it is possible, the question is - what for? Especially the representation of Elixir code as a XML file.

1 Like