I want to use Go to parse arbitrary XML and pick out specific tags. For example if we have:
<foo>
Hello, world.
<bar attr="true" />
</foo>
I want to pick out <bar attr="true" />
, and also be able to access the "other" data as a string without having to worry about what it is. I don't want to have to define every possible XML tag the document could contain - only the ones I want to pick out.
Could someone help advise how this can be done? Thanks in advance.