StaxMate
StaxMate copied to clipboard
Add a convenience method for reading "all text values of all child elements"
A relatively common case seems to be that of mapping structures like, say:
<root>
<elem1>text</elem1>
...
<elemN>textN</elemN>
</root>
Iterating over this structure is not super hard, but it would be nice to just have a method for "reading it all in", to produce map like:
{ "elem1" : "text", ... , "elemN" : "textN" }
and then let caller do whatever it needs to. Textual content should probably be simple collected with 'collectDescendantText', to work even if sub-elements were included.