Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of pretty-printing (indenting) XML with Saxy? #115

Open
thbar opened this issue Oct 11, 2022 · 0 comments
Open

Example of pretty-printing (indenting) XML with Saxy? #115

thbar opened this issue Oct 11, 2022 · 0 comments

Comments

@thbar
Copy link
Contributor

thbar commented Oct 11, 2022

For some time (see https://elixirforum.com/t/what-is-your-best-trick-to-pretty-print-a-xml-string-with-elixir-or-erlang/42010), I've wondered what is the best way to indent XML (like xmllint --format file.xml does), in order to make it more readable to humans.

I have came across javascript packages (https://www.npmjs.com/package/xml-formatter) which does that.

I wonder if someone has already implemented that with Saxy, ideally in a way that does not require a full in-RAM storage (simple_form), but instead streamed if possible.

Opening this issue to create a bit of discussion, and I will definitely comment back & create extra documentation if I find how to achieve that (for now I'll rely on javascript-land).

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant