Our great sponsors
-
mxj
Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Here's the local version: https://github.com/miku/zek/ Alternatively, https://github.com/gnewton/chidley does the same thing.
It generates Go structs from XML files. Compared to projects like https://github.com/clbanning/mxj, it generates much better Go code and you can feed it multiple example XML files.
Here's the local version: https://github.com/miku/zek/ Alternatively, https://github.com/gnewton/chidley does the same thing.
If "big" isn't actually that big compared to the RAM of the system you are running on, one option is to use an XPath library like xmlquery, which will allow you to iterate over the document using XPath expressions. You can make changes to it inline, then re-serialize it.
Check out https://github.com/twpayne/go-xmlstruct.