On Fri, Nov 4, 2016 at 4:32 PM, Tong Sun <suntong...@gmail.com> wrote:
> How to beautify a given XML string in GO?
>
> The xml.MarshalIndent() only apply to a GO structure, not XML strings.

Aside: Note that the language is called "Go", not "GO".

I've been playing around with an XML token stream processing API:

https://godoc.org/mellium.im/xmlstream

It's still experimental, and likely to change, but it would probably
be pretty easy to write a transformer that keeps track of iindentation
and adds/removes whitespace tokens as necessary (in fact, that's one
of the things I wanted something like this for in the first place).

—Sam

-- 
Sam Whited
pub 4096R/54083AE104EA7AD3

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to