go-xmlstruct
Generate Go structs from multiple XML documents. (by twpayne)
xmlquery
xmlquery is Golang XPath package for XML query. (by antchfx)
go-xmlstruct | xmlquery | |
---|---|---|
3 | 1 | |
63 | 403 | |
- | 0.7% | |
6.4 | 6.1 | |
16 days ago | 25 days ago | |
Go | Go | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go-xmlstruct
Posts with mentions or reviews of go-xmlstruct.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-30.
-
Newbie: I have a big xml file, the content is much nested tags and what I need to do is adding a field in a very nested tag in this file. One “not elegant” way is to make thousands of structs to parse the file. Do you guys have a simple solution for a task like that.
Check out https://github.com/twpayne/go-xmlstruct.
- Go-xmlstruct: generate Go structs from example XML documents
- go-xmlstruct: generate Go structs from multiple XML documents, with accurate types
xmlquery
Posts with mentions or reviews of xmlquery.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-30.
-
Newbie: I have a big xml file, the content is much nested tags and what I need to do is adding a field in a very nested tag in this file. One “not elegant” way is to make thousands of structs to parse the file. Do you guys have a simple solution for a task like that.
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.
What are some alternatives?
When comparing go-xmlstruct and xmlquery you can also consider the following projects:
mxj - Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages.