👩💻 Join our community of thousands of amazing developers!
I was really surprised how easy it was to read an XML document using the encoding/xml package that comes with the standard library. The package works by defining structs that map the XML document. If you need more flexibility then use Gustavo Niemeyer’s xmlpath package (found here). Here is the XML document we are going to read and de-serialize: <straps> <strap key="CompanyName" value="NEWCO" /> <strap key="UseEmail" value="true" />...