Yeah, I was using regexp at one point. It's less code but it just isn't
right to parse XML with it. Not when the xml.Decoder exposes such a nice
API.
On Friday, January 6, 2017 at 12:55:37 PM UTC+1, Egon wrote:
>
>
>
> On Friday, 6 January 2017 13:28:22 UTC+2, John Leidegren wrote:
>>
>> So afte
On Friday, 6 January 2017 13:28:22 UTC+2, John Leidegren wrote:
>
> So after talking a look at the xml package again I noticed the
> UnmarshalXML trap. So I used that. Here's the solution I went with.
>
> I wrapped the decoder in a recursive decent parser to make the actual
> UnmarshalXML metho
So after talking a look at the xml package again I noticed the UnmarshalXML
trap. So I used that. Here's the solution I went with.
I wrapped the decoder in a recursive decent parser to make the actual
UnmarshalXML method readable.
https://play.golang.org/p/dylYB0KsyL
It uses an example from th
You can use xml.Decoder (https://play.golang.org/p/fkp-t4_vee).
Can you show in which place OpenGL registry contains such entries? Just
interested in why it is encoded that way.
Also take a look at https://github.com/go-gl/glow
+ Egon
On Friday, 6 January 2017 11:28:42 UTC+2, John Leidegren wr
OK, then I give up. If that is how it works.
The source XML file I'm reading is from the OpenGL registry and I cannot
change the way they structured that file. What baffles me is that I can't
seem to simply concat the text nodes either.
I'd like to, as an option, just read the the concatenated
On Thu, Jan 5, 2017 at 2:40 PM, John Leidegren
wrote:
> See https://play.golang.org/p/XjKdm7Pooh
>
> I was hoping to get back a, b followed by c but I get a, c then b. I just
> can't get this to work.
>
> How is it even possible for it to read character data from before and
> after the B node?
>
See https://play.golang.org/p/XjKdm7Pooh
I was hoping to get back a, b followed by c but I get a, c then b. I just
can't get this to work.
How is it even possible for it to read character data from before and after
the B node?
--
You received this message because you are subscribed to the Goo