Re: [go-nuts] XML Pretty Print

2017-12-15 Thread Tamás Gulácsi
A natural choice for xml pretty printing is xmllint from libxmltools-bin.

-- 
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.


Re: [go-nuts] XML Pretty Print

2017-12-15 Thread Hugh S. Myers
Has anyone tried HTML Tidy? I know it Pretty-prints HTML and I remember
that the same is claimed for XML?…

On Fri, Dec 15, 2017 at 10:27 AM, Mandolyte  wrote:

> I was able to do a minimalist pretty print with limitations just using
> marshal/unmarshal. See the code here
>  under the "identityXform"
> folder. There is a "readme" in that folder with some notes on this. Also
> tried my hand at blogging about my findings http://www.mandolyte.info.
>
> Thanks all for responses.
> Cecil
>
>
> On Monday, December 11, 2017 at 11:38:44 AM UTC-5, Sam Whited wrote:
>>
>> On Mon, Dec 11, 2017, at 09:12, Mandolyte wrote:
>> > At my previous company I had a Go program that would take any XML
>> > document
>> > and output it as XML in a nicer human readable format, i.e., pretty
>> > printed. I've trying to find it again, but my searches have not turned
>> up
>> > any. Perhaps I had written myself, but I didn't think so.
>> >
>> > Does anyone have a link to one?
>>
>> My xmlstream package contains a formatting transformer that might do
>> what you want:
>>
>> https://godoc.org/mellium.im/xmlstream
>>
>> Note that this was written to test some changes for Go 1.10 and it may
>> only build there.
>>
>> —Sam
>>
> --
> 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.
>

-- 
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.


Re: [go-nuts] XML Pretty Print

2017-12-15 Thread Mandolyte
I was able to do a minimalist pretty print with limitations just using 
marshal/unmarshal. See the code here 
 under the "identityXform" folder. 
There is a "readme" in that folder with some notes on this. Also tried my 
hand at blogging about my findings http://www.mandolyte.info.

Thanks all for responses.
Cecil

On Monday, December 11, 2017 at 11:38:44 AM UTC-5, Sam Whited wrote:
>
> On Mon, Dec 11, 2017, at 09:12, Mandolyte wrote: 
> > At my previous company I had a Go program that would take any XML 
> > document 
> > and output it as XML in a nicer human readable format, i.e., pretty 
> > printed. I've trying to find it again, but my searches have not turned 
> up 
> > any. Perhaps I had written myself, but I didn't think so. 
> > 
> > Does anyone have a link to one? 
>
> My xmlstream package contains a formatting transformer that might do 
> what you want: 
>
> https://godoc.org/mellium.im/xmlstream 
>
> Note that this was written to test some changes for Go 1.10 and it may 
> only build there. 
>
> —Sam 
>

-- 
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.


Re: [go-nuts] XML Pretty Print

2017-12-11 Thread Sam Whited
On Mon, Dec 11, 2017, at 09:12, Mandolyte wrote:
> At my previous company I had a Go program that would take any XML
> document 
> and output it as XML in a nicer human readable format, i.e., pretty 
> printed. I've trying to find it again, but my searches have not turned up 
> any. Perhaps I had written myself, but I didn't think so.
> 
> Does anyone have a link to one?

My xmlstream package contains a formatting transformer that might do
what you want:

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

Note that this was written to test some changes for Go 1.10 and it may
only build there.

—Sam

-- 
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.


[go-nuts] XML Pretty Print

2017-12-11 Thread Mandolyte
At my previous company I had a Go program that would take any XML document 
and output it as XML in a nicer human readable format, i.e., pretty 
printed. I've trying to find it again, but my searches have not turned up 
any. Perhaps I had written myself, but I didn't think so.

Does anyone have a link to one?

Thanks in advance,
Cecil

-- 
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.