On Thu, Jan 5, 2017 at 2:40 PM, John Leidegren <john.leideg...@gmail.com> 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? > > The problem is that there is no C. A gets the characters from the <el> element, and B gets the b from the <B> element: https://play.golang.org/p/czAXksSYMo I don't think you can get what you want from the XML unmarshal if 'a' and 'c' are going to be chardata in the same element. You may just have to put them in separate elements or parse the 'A' value to get the two separate strings. -- 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.