The Go XML Formatter, xmlfmt, will format the XML string in a readable way.
Unlike other approaches, there is no XML decoding and encoding involved, only pure regular expression matching and replacing. So it is much faster than going through decoding and encoding procedures. Moreover, the exact XML source string is preserved, instead of being changed by the encoder to something syntactically the same but looks totally different. This is why this package exists in the first place.
This is a Go package but a command line tool is also available.
Go XML Formatter alternatives and similar packages
Based on the "XML" category.
Alternatively, view xmlfmt alternatives based on common mentions on social networks and blogs.
Do you think we are missing an alternative of Go XML Formatter or a related project?