In the Go XML package, there is a comment:
Mapping between XML elements and data structures is inherently flawed: an XML element is an order-dependent collection of anonymous values, while a data structure is an order-independent collection of named values. See package json for a textual representation more suitable to data structures.
Why would someone assert this? A data structure can also be, for example, an array, which is an order-dependent collection of values.
XML may typically be verbose and complex but I can't see the argument that mapping it to a data structure is flawed. Can someone explain this?