Re: [go-nuts] XML Stream Parser examples

2017-04-05 Thread Sam Whited
On Wed, Apr 5, 2017 at 6:44 PM, Mandolyte wrote: > I need to parse to find a known element, then based on what I find, decode > its children elements. This implies I need to treat the child elements as a > document (may have to add a fake root node, unless the decoder accepts

Re: [go-nuts] XML Stream Parser examples

2017-04-05 Thread Matt Harden
Here's my favorite way to handle such situations. It can probably be adapted to your situation. https://play.golang.org/p/FQ0g4rytz3 On Wed, Apr 5, 2017 at 4:44 PM Mandolyte wrote: > First, never thought I'd have to parse XML again (it's been over 10 > years), but life

[go-nuts] XML Stream Parser examples

2017-04-05 Thread Mandolyte
First, never thought I'd have to parse XML again (it's been over 10 years), but life happens... After a lot of searching I found only few examples using the streaming API. But I'm not sure the examples will work for me (I'll find out more tomorrow when I get back to the office). The XML I must