FAQ
In the following go playground example I don't know why I am unable to read
the attribute value even when specifying the 'attr' argument for that field
to the xml package...

http://play.golang.org/p/pden6qdScF

I am trying to unmarshal the id attribute, but only the inner tags are
being parsed correctly.

Thanks if anyone can help

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Dupoxy at Jan 18, 2015 at 7:32 am
    on Line 20:
    ID string `xml:"id,attr"` // remove the space between the comma and attr

    http://play.golang.org/p/xE9YaVbd0W

    hope this helps


    Le dimanche 18 janvier 2015 07:37:59 UTC+1, Alex Howard a écrit :

    In the following go playground example I don't know why I am unable to
    read the attribute value even when specifying the 'attr' argument for that
    field to the xml package...

    http://play.golang.org/p/pden6qdScF

    I am trying to unmarshal the id attribute, but only the inner tags are
    being parsed correctly.

    Thanks if anyone can help
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Alex Howard at Jan 18, 2015 at 4:57 pm
    :) many thanks, I thought I was going mad!
    On Sunday, 18 January 2015 08:32:31 UTC+1, dupoxy wrote:

    on Line 20:
    ID string `xml:"id,attr"` // remove the space between the comma and attr

    http://play.golang.org/p/xE9YaVbd0W

    hope this helps


    Le dimanche 18 janvier 2015 07:37:59 UTC+1, Alex Howard a écrit :

    In the following go playground example I don't know why I am unable to
    read the attribute value even when specifying the 'attr' argument for that
    field to the xml package...

    http://play.golang.org/p/pden6qdScF

    I am trying to unmarshal the id attribute, but only the inner tags are
    being parsed correctly.

    Thanks if anyone can help
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 18, '15 at 6:38a
activeJan 18, '15 at 4:57p
posts3
users2
websitegolang.org

2 users in discussion

Alex Howard: 2 posts Dupoxy: 1 post

People

Translate

site design / logo © 2022 Grokbase