Chidley worked great for me -- https://github.com/gnewton/chidley
On Fri, Jul 14, 2017 at 9:37 PM Matt Harden <matt.har...@gmail.com> wrote: > The sample document you gave actually doesn't have any attributes at all. > I guess you meant namespaces? > > Are you leaving out the namespace declarations from your sample? They > usually look like xmlns:soapenv="http://some_url". Those are important to > parsing with namespaces in Go. If you don't have them, you can still parse > though. Just leave the namespace part ("os" or "soapenv") out of the field > name you give in the struct. > > On Fri, Jul 14, 2017 at 4:24 AM Marcin Jurczuk <mjurc...@gmail.com> wrote: > >> Hi, >> >> I'm stuck at problem how to map XML into Go struct. >> Most of examples are for xml where you are not storing information in >> attributes. >> My have all a lot of data in attrs >> >> Example XML: >> >> <soapenv:Body> >> <os:QUERY-DEVINFO> >> <os:MODIFIER>DEVMEMORYINFO</os:MODIFIER> >> <os:object> >> <os:DEV>10.1.1.10</os:DEV> >> </os:object> >> <os:Session>1</os:Session> >> <os:objectParams/> >> </os:QUERY-DEVINFO> >> </soapenv:Body> >> >> >> Any help how should look struct that will output such XML ? >> >> >> -- >> 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. > -- 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.